//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension CodePipeline {
    // MARK: Enums

    public enum ActionCategory: String, CustomStringConvertible, Codable {
        case approval = "Approval"
        case build = "Build"
        case deploy = "Deploy"
        case invoke = "Invoke"
        case source = "Source"
        case test = "Test"
        public var description: String { return self.rawValue }
    }

    public enum ActionConfigurationPropertyType: String, CustomStringConvertible, Codable {
        case boolean = "Boolean"
        case number = "Number"
        case string = "String"
        public var description: String { return self.rawValue }
    }

    public enum ActionExecutionStatus: String, CustomStringConvertible, Codable {
        case abandoned = "Abandoned"
        case failed = "Failed"
        case inprogress = "InProgress"
        case succeeded = "Succeeded"
        public var description: String { return self.rawValue }
    }

    public enum ActionOwner: String, CustomStringConvertible, Codable {
        case aws = "AWS"
        case custom = "Custom"
        case thirdparty = "ThirdParty"
        public var description: String { return self.rawValue }
    }

    public enum ApprovalStatus: String, CustomStringConvertible, Codable {
        case approved = "Approved"
        case rejected = "Rejected"
        public var description: String { return self.rawValue }
    }

    public enum ArtifactLocationType: String, CustomStringConvertible, Codable {
        case s3 = "S3"
        public var description: String { return self.rawValue }
    }

    public enum ArtifactStoreType: String, CustomStringConvertible, Codable {
        case s3 = "S3"
        public var description: String { return self.rawValue }
    }

    public enum BlockerType: String, CustomStringConvertible, Codable {
        case schedule = "Schedule"
        public var description: String { return self.rawValue }
    }

    public enum EncryptionKeyType: String, CustomStringConvertible, Codable {
        case kms = "KMS"
        public var description: String { return self.rawValue }
    }

    public enum ExecutorType: String, CustomStringConvertible, Codable {
        case jobworker = "JobWorker"
        case lambda = "Lambda"
        public var description: String { return self.rawValue }
    }

    public enum FailureType: String, CustomStringConvertible, Codable {
        case configurationerror = "ConfigurationError"
        case jobfailed = "JobFailed"
        case permissionerror = "PermissionError"
        case revisionoutofsync = "RevisionOutOfSync"
        case revisionunavailable = "RevisionUnavailable"
        case systemunavailable = "SystemUnavailable"
        public var description: String { return self.rawValue }
    }

    public enum JobStatus: String, CustomStringConvertible, Codable {
        case created = "Created"
        case dispatched = "Dispatched"
        case failed = "Failed"
        case inprogress = "InProgress"
        case queued = "Queued"
        case succeeded = "Succeeded"
        case timedout = "TimedOut"
        public var description: String { return self.rawValue }
    }

    public enum PipelineExecutionStatus: String, CustomStringConvertible, Codable {
        case cancelled = "Cancelled"
        case failed = "Failed"
        case inprogress = "InProgress"
        case stopped = "Stopped"
        case stopping = "Stopping"
        case succeeded = "Succeeded"
        case superseded = "Superseded"
        public var description: String { return self.rawValue }
    }

    public enum StageExecutionStatus: String, CustomStringConvertible, Codable {
        case cancelled = "Cancelled"
        case failed = "Failed"
        case inprogress = "InProgress"
        case stopped = "Stopped"
        case stopping = "Stopping"
        case succeeded = "Succeeded"
        public var description: String { return self.rawValue }
    }

    public enum StageRetryMode: String, CustomStringConvertible, Codable {
        case failedActions = "FAILED_ACTIONS"
        public var description: String { return self.rawValue }
    }

    public enum StageTransitionType: String, CustomStringConvertible, Codable {
        case inbound = "Inbound"
        case outbound = "Outbound"
        public var description: String { return self.rawValue }
    }

    public enum TriggerType: String, CustomStringConvertible, Codable {
        case cloudwatchevent = "CloudWatchEvent"
        case createpipeline = "CreatePipeline"
        case pollforsourcechanges = "PollForSourceChanges"
        case putactionrevision = "PutActionRevision"
        case startpipelineexecution = "StartPipelineExecution"
        case webhook = "Webhook"
        public var description: String { return self.rawValue }
    }

    public enum WebhookAuthenticationType: String, CustomStringConvertible, Codable {
        case githubHmac = "GITHUB_HMAC"
        case ip = "IP"
        case unauthenticated = "UNAUTHENTICATED"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AWSSessionCredentials: AWSDecodableShape {
        /// The access key for the session.
        public let accessKeyId: String
        /// The secret access key for the session.
        public let secretAccessKey: String
        /// The token for the session.
        public let sessionToken: String

        public init(accessKeyId: String, secretAccessKey: String, sessionToken: String) {
            self.accessKeyId = accessKeyId
            self.secretAccessKey = secretAccessKey
            self.sessionToken = sessionToken
        }

        private enum CodingKeys: String, CodingKey {
            case accessKeyId
            case secretAccessKey
            case sessionToken
        }
    }

    public struct AcknowledgeJobInput: AWSEncodableShape {
        /// The unique system-generated ID of the job for which you want to confirm receipt.
        public let jobId: String
        /// A system-generated random number that AWS CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response of the PollForJobs request that returned this job.
        public let nonce: String

        public init(jobId: String, nonce: String) {
            self.jobId = jobId
            self.nonce = nonce
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
            try self.validate(self.nonce, name: "nonce", parent: name, max: 50)
            try self.validate(self.nonce, name: "nonce", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case jobId
            case nonce
        }
    }

    public struct AcknowledgeJobOutput: AWSDecodableShape {
        /// Whether the job worker has received the specified job.
        public let status: JobStatus?

        public init(status: JobStatus? = nil) {
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case status
        }
    }

    public struct AcknowledgeThirdPartyJobInput: AWSEncodableShape {
        /// The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
        public let clientToken: String
        /// The unique system-generated ID of the job.
        public let jobId: String
        /// A system-generated random number that AWS CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response to a GetThirdPartyJobDetails request.
        public let nonce: String

        public init(clientToken: String, jobId: String, nonce: String) {
            self.clientToken = clientToken
            self.jobId = jobId
            self.nonce = nonce
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, max: 512)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.nonce, name: "nonce", parent: name, max: 50)
            try self.validate(self.nonce, name: "nonce", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case jobId
            case nonce
        }
    }

    public struct AcknowledgeThirdPartyJobOutput: AWSDecodableShape {
        /// The status information for the third party job, if any.
        public let status: JobStatus?

        public init(status: JobStatus? = nil) {
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case status
        }
    }

    public struct ActionConfiguration: AWSDecodableShape {
        /// The configuration data for the action.
        public let configuration: [String: String]?

        public init(configuration: [String: String]? = nil) {
            self.configuration = configuration
        }

        private enum CodingKeys: String, CodingKey {
            case configuration
        }
    }

    public struct ActionConfigurationProperty: AWSEncodableShape & AWSDecodableShape {
        /// The description of the action configuration property that is displayed to users.
        public let description: String?
        /// Whether the configuration property is a key.
        public let key: Bool
        /// The name of the action configuration property.
        public let name: String
        /// Indicates that the property is used with PollForJobs. When creating a custom action, an action can have up to one queryable property. If it has one, that property must be both required and not secret. If you create a pipeline with a custom action type, and that custom action contains a queryable property, the value for that configuration property is subject to other restrictions. The value must be less than or equal to twenty (20) characters. The value can contain only alphanumeric characters, underscores, and hyphens.
        public let queryable: Bool?
        /// Whether the configuration property is a required value.
        public let required: Bool
        /// Whether the configuration property is secret. Secrets are hidden from all calls except for GetJobDetails, GetThirdPartyJobDetails, PollForJobs, and PollForThirdPartyJobs. When updating a pipeline, passing * * * * * without changing any other values of the action preserves the previous value of the secret.
        public let secret: Bool
        /// The type of the configuration property.
        public let type: ActionConfigurationPropertyType?

        public init(description: String? = nil, key: Bool, name: String, queryable: Bool? = nil, required: Bool, secret: Bool, type: ActionConfigurationPropertyType? = nil) {
            self.description = description
            self.key = key
            self.name = name
            self.queryable = queryable
            self.required = required
            self.secret = secret
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 160)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 50)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case key
            case name
            case queryable
            case required
            case secret
            case type
        }
    }

    public struct ActionContext: AWSDecodableShape {
        /// The system-generated unique ID that corresponds to an action's execution.
        public let actionExecutionId: String?
        /// The name of the action in the context of a job.
        public let name: String?

        public init(actionExecutionId: String? = nil, name: String? = nil) {
            self.actionExecutionId = actionExecutionId
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case actionExecutionId
            case name
        }
    }

    public struct ActionDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the action type and the provider of the action.
        public let actionTypeId: ActionTypeId
        /// The action's configuration. These are key-value pairs that specify input values for an action. For more information, see Action Structure Requirements in CodePipeline. For the list of configuration properties for the AWS CloudFormation action type in CodePipeline, see Configuration Properties Reference in the AWS CloudFormation User Guide. For template snippets with examples, see Using Parameter Override Functions with CodePipeline Pipelines in the AWS CloudFormation User Guide. The values can be represented in either JSON or YAML format. For example, the JSON configuration item format is as follows:   JSON:   "Configuration" : { Key : Value },
        public let configuration: [String: String]?
        /// The name or ID of the artifact consumed by the action, such as a test or build artifact.
        public let inputArtifacts: [InputArtifact]?
        /// The action declaration's name.
        public let name: String
        /// The variable namespace associated with the action. All variables produced as output by this action fall under this namespace.
        public let namespace: String?
        /// The name or ID of the result of the action declaration, such as a test or build artifact.
        public let outputArtifacts: [OutputArtifact]?
        /// The action declaration's AWS Region, such as us-east-1.
        public let region: String?
        /// The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for the pipeline.
        public let roleArn: String?
        /// The order in which actions are run.
        public let runOrder: Int?

        public init(actionTypeId: ActionTypeId, configuration: [String: String]? = nil, inputArtifacts: [InputArtifact]? = nil, name: String, namespace: String? = nil, outputArtifacts: [OutputArtifact]? = nil, region: String? = nil, roleArn: String? = nil, runOrder: Int? = nil) {
            self.actionTypeId = actionTypeId
            self.configuration = configuration
            self.inputArtifacts = inputArtifacts
            self.name = name
            self.namespace = namespace
            self.outputArtifacts = outputArtifacts
            self.region = region
            self.roleArn = roleArn
            self.runOrder = runOrder
        }

        public func validate(name: String) throws {
            try self.actionTypeId.validate(name: "\(name).actionTypeId")
            try self.configuration?.forEach {
                try validate($0.key, name: "configuration.key", parent: name, max: 50)
                try validate($0.key, name: "configuration.key", parent: name, min: 1)
                try validate($0.value, name: "configuration[\"\($0.key)\"]", parent: name, max: 1000)
                try validate($0.value, name: "configuration[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.inputArtifacts?.forEach {
                try $0.validate(name: "\(name).inputArtifacts[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.namespace, name: "namespace", parent: name, max: 100)
            try self.validate(self.namespace, name: "namespace", parent: name, min: 1)
            try self.validate(self.namespace, name: "namespace", parent: name, pattern: "[A-Za-z0-9@\\-_]+")
            try self.outputArtifacts?.forEach {
                try $0.validate(name: "\(name).outputArtifacts[]")
            }
            try self.validate(self.region, name: "region", parent: name, max: 30)
            try self.validate(self.region, name: "region", parent: name, min: 4)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1024)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "arn:aws(-[\\w]+)*:iam::[0-9]{12}:role/.*")
            try self.validate(self.runOrder, name: "runOrder", parent: name, max: 999)
            try self.validate(self.runOrder, name: "runOrder", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case actionTypeId
            case configuration
            case inputArtifacts
            case name
            case namespace
            case outputArtifacts
            case region
            case roleArn
            case runOrder
        }
    }

    public struct ActionExecution: AWSDecodableShape {
        /// ID of the workflow action execution in the current stage. Use the GetPipelineState action to retrieve the current action execution details of the current stage.  For older executions, this field might be empty. The action execution ID is available for executions run on or after March 2020.
        public let actionExecutionId: String?
        /// The details of an error returned by a URL external to AWS.
        public let errorDetails: ErrorDetails?
        /// The external ID of the run of the action.
        public let externalExecutionId: String?
        /// The URL of a resource external to AWS that is used when running the action (for example, an external repository URL).
        public let externalExecutionUrl: String?
        /// The last status change of the action.
        public let lastStatusChange: Date?
        /// The ARN of the user who last changed the pipeline.
        public let lastUpdatedBy: String?
        /// A percentage of completeness of the action as it runs.
        public let percentComplete: Int?
        /// The status of the action, or for a completed action, the last status of the action.
        public let status: ActionExecutionStatus?
        /// A summary of the run of the action.
        public let summary: String?
        /// The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the GetPipelineState command. It is used to validate that the approval request corresponding to this token is still valid.
        public let token: String?

        public init(actionExecutionId: String? = nil, errorDetails: ErrorDetails? = nil, externalExecutionId: String? = nil, externalExecutionUrl: String? = nil, lastStatusChange: Date? = nil, lastUpdatedBy: String? = nil, percentComplete: Int? = nil, status: ActionExecutionStatus? = nil, summary: String? = nil, token: String? = nil) {
            self.actionExecutionId = actionExecutionId
            self.errorDetails = errorDetails
            self.externalExecutionId = externalExecutionId
            self.externalExecutionUrl = externalExecutionUrl
            self.lastStatusChange = lastStatusChange
            self.lastUpdatedBy = lastUpdatedBy
            self.percentComplete = percentComplete
            self.status = status
            self.summary = summary
            self.token = token
        }

        private enum CodingKeys: String, CodingKey {
            case actionExecutionId
            case errorDetails
            case externalExecutionId
            case externalExecutionUrl
            case lastStatusChange
            case lastUpdatedBy
            case percentComplete
            case status
            case summary
            case token
        }
    }

    public struct ActionExecutionDetail: AWSDecodableShape {
        /// The action execution ID.
        public let actionExecutionId: String?
        /// The name of the action.
        public let actionName: String?
        /// Input details for the action execution, such as role ARN, Region, and input artifacts.
        public let input: ActionExecutionInput?
        /// The last update time of the action execution.
        public let lastUpdateTime: Date?
        /// Output details for the action execution, such as the action execution result.
        public let output: ActionExecutionOutput?
        /// The pipeline execution ID for the action execution.
        public let pipelineExecutionId: String?
        /// The version of the pipeline where the action was run.
        public let pipelineVersion: Int?
        /// The name of the stage that contains the action.
        public let stageName: String?
        /// The start time of the action execution.
        public let startTime: Date?
        ///  The status of the action execution. Status categories are InProgress, Succeeded, and Failed.
        public let status: ActionExecutionStatus?

        public init(actionExecutionId: String? = nil, actionName: String? = nil, input: ActionExecutionInput? = nil, lastUpdateTime: Date? = nil, output: ActionExecutionOutput? = nil, pipelineExecutionId: String? = nil, pipelineVersion: Int? = nil, stageName: String? = nil, startTime: Date? = nil, status: ActionExecutionStatus? = nil) {
            self.actionExecutionId = actionExecutionId
            self.actionName = actionName
            self.input = input
            self.lastUpdateTime = lastUpdateTime
            self.output = output
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineVersion = pipelineVersion
            self.stageName = stageName
            self.startTime = startTime
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case actionExecutionId
            case actionName
            case input
            case lastUpdateTime
            case output
            case pipelineExecutionId
            case pipelineVersion
            case stageName
            case startTime
            case status
        }
    }

    public struct ActionExecutionFilter: AWSEncodableShape {
        /// The pipeline execution ID used to filter action execution history.
        public let pipelineExecutionId: String?

        public init(pipelineExecutionId: String? = nil) {
            self.pipelineExecutionId = pipelineExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId
        }
    }

    public struct ActionExecutionInput: AWSDecodableShape {
        public let actionTypeId: ActionTypeId?
        /// Configuration data for an action execution.
        public let configuration: [String: String]?
        /// Details of input artifacts of the action that correspond to the action execution.
        public let inputArtifacts: [ArtifactDetail]?
        /// The variable namespace associated with the action. All variables produced as output by this action fall under this namespace.
        public let namespace: String?
        /// The AWS Region for the action, such as us-east-1.
        public let region: String?
        /// Configuration data for an action execution with all variable references replaced with their real values for the execution.
        public let resolvedConfiguration: [String: String]?
        /// The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for the pipeline.
        public let roleArn: String?

        public init(actionTypeId: ActionTypeId? = nil, configuration: [String: String]? = nil, inputArtifacts: [ArtifactDetail]? = nil, namespace: String? = nil, region: String? = nil, resolvedConfiguration: [String: String]? = nil, roleArn: String? = nil) {
            self.actionTypeId = actionTypeId
            self.configuration = configuration
            self.inputArtifacts = inputArtifacts
            self.namespace = namespace
            self.region = region
            self.resolvedConfiguration = resolvedConfiguration
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case actionTypeId
            case configuration
            case inputArtifacts
            case namespace
            case region
            case resolvedConfiguration
            case roleArn
        }
    }

    public struct ActionExecutionOutput: AWSDecodableShape {
        /// Execution result information listed in the output details for an action execution.
        public let executionResult: ActionExecutionResult?
        /// Details of output artifacts of the action that correspond to the action execution.
        public let outputArtifacts: [ArtifactDetail]?
        /// The outputVariables field shows the key-value pairs that were output as part of that execution.
        public let outputVariables: [String: String]?

        public init(executionResult: ActionExecutionResult? = nil, outputArtifacts: [ArtifactDetail]? = nil, outputVariables: [String: String]? = nil) {
            self.executionResult = executionResult
            self.outputArtifacts = outputArtifacts
            self.outputVariables = outputVariables
        }

        private enum CodingKeys: String, CodingKey {
            case executionResult
            case outputArtifacts
            case outputVariables
        }
    }

    public struct ActionExecutionResult: AWSDecodableShape {
        /// The action provider's external ID for the action execution.
        public let externalExecutionId: String?
        /// The action provider's summary for the action execution.
        public let externalExecutionSummary: String?
        /// The deepest external link to the external resource (for example, a repository URL or deployment endpoint) that is used when running the action.
        public let externalExecutionUrl: String?

        public init(externalExecutionId: String? = nil, externalExecutionSummary: String? = nil, externalExecutionUrl: String? = nil) {
            self.externalExecutionId = externalExecutionId
            self.externalExecutionSummary = externalExecutionSummary
            self.externalExecutionUrl = externalExecutionUrl
        }

        private enum CodingKeys: String, CodingKey {
            case externalExecutionId
            case externalExecutionSummary
            case externalExecutionUrl
        }
    }

    public struct ActionRevision: AWSEncodableShape & AWSDecodableShape {
        /// The date and time when the most recent version of the action was created, in timestamp format.
        public let created: Date
        /// The unique identifier of the change that set the state to this revision (for example, a deployment ID or timestamp).
        public let revisionChangeId: String
        /// The system-generated unique ID that identifies the revision number of the action.
        public let revisionId: String

        public init(created: Date, revisionChangeId: String, revisionId: String) {
            self.created = created
            self.revisionChangeId = revisionChangeId
            self.revisionId = revisionId
        }

        public func validate(name: String) throws {
            try self.validate(self.revisionChangeId, name: "revisionChangeId", parent: name, max: 100)
            try self.validate(self.revisionChangeId, name: "revisionChangeId", parent: name, min: 1)
            try self.validate(self.revisionId, name: "revisionId", parent: name, max: 1500)
            try self.validate(self.revisionId, name: "revisionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case created
            case revisionChangeId
            case revisionId
        }
    }

    public struct ActionState: AWSDecodableShape {
        /// The name of the action.
        public let actionName: String?
        /// Represents information about the version (or revision) of an action.
        public let currentRevision: ActionRevision?
        /// A URL link for more information about the state of the action, such as a deployment group details page.
        public let entityUrl: String?
        /// Represents information about the run of an action.
        public let latestExecution: ActionExecution?
        /// A URL link for more information about the revision, such as a commit details page.
        public let revisionUrl: String?

        public init(actionName: String? = nil, currentRevision: ActionRevision? = nil, entityUrl: String? = nil, latestExecution: ActionExecution? = nil, revisionUrl: String? = nil) {
            self.actionName = actionName
            self.currentRevision = currentRevision
            self.entityUrl = entityUrl
            self.latestExecution = latestExecution
            self.revisionUrl = revisionUrl
        }

        private enum CodingKeys: String, CodingKey {
            case actionName
            case currentRevision
            case entityUrl
            case latestExecution
            case revisionUrl
        }
    }

    public struct ActionType: AWSDecodableShape {
        /// The configuration properties for the action type.
        public let actionConfigurationProperties: [ActionConfigurationProperty]?
        /// Represents information about an action type.
        public let id: ActionTypeId
        /// The details of the input artifact for the action, such as its commit ID.
        public let inputArtifactDetails: ArtifactDetails
        /// The details of the output artifact of the action, such as its commit ID.
        public let outputArtifactDetails: ArtifactDetails
        /// The settings for the action type.
        public let settings: ActionTypeSettings?

        public init(actionConfigurationProperties: [ActionConfigurationProperty]? = nil, id: ActionTypeId, inputArtifactDetails: ArtifactDetails, outputArtifactDetails: ArtifactDetails, settings: ActionTypeSettings? = nil) {
            self.actionConfigurationProperties = actionConfigurationProperties
            self.id = id
            self.inputArtifactDetails = inputArtifactDetails
            self.outputArtifactDetails = outputArtifactDetails
            self.settings = settings
        }

        private enum CodingKeys: String, CodingKey {
            case actionConfigurationProperties
            case id
            case inputArtifactDetails
            case outputArtifactDetails
            case settings
        }
    }

    public struct ActionTypeArtifactDetails: AWSEncodableShape & AWSDecodableShape {
        /// The maximum allowed number of artifacts that can be used with the actiontype. For example, you should specify a minimum and maximum of zero input artifacts for an action type with a category of source.
        public let maximumCount: Int
        /// The minimum allowed number of artifacts that can be used with the action type. For example, you should specify a minimum and maximum of zero input artifacts for an action type with a category of source.
        public let minimumCount: Int

        public init(maximumCount: Int, minimumCount: Int) {
            self.maximumCount = maximumCount
            self.minimumCount = minimumCount
        }

        public func validate(name: String) throws {
            try self.validate(self.maximumCount, name: "maximumCount", parent: name, max: 10)
            try self.validate(self.maximumCount, name: "maximumCount", parent: name, min: 0)
            try self.validate(self.minimumCount, name: "minimumCount", parent: name, max: 10)
            try self.validate(self.minimumCount, name: "minimumCount", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case maximumCount
            case minimumCount
        }
    }

    public struct ActionTypeDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// The description for the action type to be updated.
        public let description: String?
        /// Information about the executor for an action type that was created with any supported integration model.
        public let executor: ActionTypeExecutor
        /// The action ID is composed of the action category, owner, provider, and version of the action type to be updated.
        public let id: ActionTypeIdentifier
        /// Details for the artifacts, such as application files, to be worked on by the action. For example, the minimum and maximum number of input artifacts allowed.
        public let inputArtifactDetails: ActionTypeArtifactDetails
        /// Details for the output artifacts, such as a built application, that are the result of the action. For example, the minimum and maximum number of output artifacts allowed.
        public let outputArtifactDetails: ActionTypeArtifactDetails
        /// Details identifying the accounts with permissions to use the action type.
        public let permissions: ActionTypePermissions?
        /// The properties of the action type to be updated.
        public let properties: [ActionTypeProperty]?
        /// The links associated with the action type to be updated.
        public let urls: ActionTypeUrls?

        public init(description: String? = nil, executor: ActionTypeExecutor, id: ActionTypeIdentifier, inputArtifactDetails: ActionTypeArtifactDetails, outputArtifactDetails: ActionTypeArtifactDetails, permissions: ActionTypePermissions? = nil, properties: [ActionTypeProperty]? = nil, urls: ActionTypeUrls? = nil) {
            self.description = description
            self.executor = executor
            self.id = id
            self.inputArtifactDetails = inputArtifactDetails
            self.outputArtifactDetails = outputArtifactDetails
            self.permissions = permissions
            self.properties = properties
            self.urls = urls
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.executor.validate(name: "\(name).executor")
            try self.id.validate(name: "\(name).id")
            try self.inputArtifactDetails.validate(name: "\(name).inputArtifactDetails")
            try self.outputArtifactDetails.validate(name: "\(name).outputArtifactDetails")
            try self.permissions?.validate(name: "\(name).permissions")
            try self.properties?.forEach {
                try $0.validate(name: "\(name).properties[]")
            }
            try self.validate(self.properties, name: "properties", parent: name, max: 10)
            try self.urls?.validate(name: "\(name).urls")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case executor
            case id
            case inputArtifactDetails
            case outputArtifactDetails
            case permissions
            case properties
            case urls
        }
    }

    public struct ActionTypeExecutor: AWSEncodableShape & AWSDecodableShape {
        /// The action configuration properties for the action type. These properties are specified in the action definition when the action type is created.
        public let configuration: ExecutorConfiguration
        /// The timeout in seconds for the job. An action execution can consist of multiple jobs. This is the timeout for a single job, and not for the entire action execution.
        public let jobTimeout: Int?
        /// The policy statement that specifies the permissions in the CodePipeline customer’s account that are needed to successfully run an action execution. To grant permission to another account, specify the account ID as the Principal. For AWS services, the Principal is a domain-style identifier defined by the service, like codepipeline.amazonaws.com.  The size of the passed JSON policy document cannot exceed 2048 characters.
        public let policyStatementsTemplate: String?
        /// The integration model used to create and update the action type, such as the Lambda integration model. Each integration type has a related action engine, or executor. The available executor types are Lambda and JobWorker.
        public let type: ExecutorType

        public init(configuration: ExecutorConfiguration, jobTimeout: Int? = nil, policyStatementsTemplate: String? = nil, type: ExecutorType) {
            self.configuration = configuration
            self.jobTimeout = jobTimeout
            self.policyStatementsTemplate = policyStatementsTemplate
            self.type = type
        }

        public func validate(name: String) throws {
            try self.configuration.validate(name: "\(name).configuration")
            try self.validate(self.jobTimeout, name: "jobTimeout", parent: name, max: 43200)
            try self.validate(self.jobTimeout, name: "jobTimeout", parent: name, min: 60)
            try self.validate(self.policyStatementsTemplate, name: "policyStatementsTemplate", parent: name, max: 2048)
            try self.validate(self.policyStatementsTemplate, name: "policyStatementsTemplate", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case configuration
            case jobTimeout
            case policyStatementsTemplate
            case type
        }
    }

    public struct ActionTypeId: AWSEncodableShape & AWSDecodableShape {
        /// A category defines what kind of action can be taken in the stage, and constrains the provider type for the action. Valid categories are limited to one of the following values.    Source   Build   Test   Deploy   Invoke   Approval
        public let category: ActionCategory
        /// The creator of the action being called. There are three valid values for the Owner field in the action category section within your pipeline structure: AWS, ThirdParty, and Custom. For more information, see Valid Action Types and Providers in CodePipeline.
        public let owner: ActionOwner
        /// The provider of the service being called by the action. Valid providers are determined by the action category. For example, an action in the Deploy category type might have a provider of AWS CodeDeploy, which would be specified as CodeDeploy. For more information, see Valid Action Types and Providers in CodePipeline.
        public let provider: String
        /// A string that describes the action version.
        public let version: String

        public init(category: ActionCategory, owner: ActionOwner, provider: String, version: String) {
            self.category = category
            self.owner = owner
            self.provider = provider
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "[0-9A-Za-z_-]+")
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "[0-9A-Za-z_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case category
            case owner
            case provider
            case version
        }
    }

    public struct ActionTypeIdentifier: AWSEncodableShape & AWSDecodableShape {
        /// A category defines what kind of action can be taken in the stage. Valid categories are limited to one of the following values:    Source     Build     Test     Deploy     Approval     Invoke
        public let category: ActionCategory
        /// The creator of the action type being called. There are two valid values for the owner field: AWS and ThirdParty.
        public let owner: String
        /// The provider of the action type being called. The provider name is supplied when the action type is created.
        public let provider: String
        /// A string that describes the action type version.
        public let version: String

        public init(category: ActionCategory, owner: String, provider: String, version: String) {
            self.category = category
            self.owner = owner
            self.provider = provider
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.owner, name: "owner", parent: name, pattern: "AWS|ThirdParty")
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "[0-9A-Za-z_-]+")
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "[0-9A-Za-z_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case category
            case owner
            case provider
            case version
        }
    }

    public struct ActionTypePermissions: AWSEncodableShape & AWSDecodableShape {
        /// A list of AWS account IDs with allow access to use the action type in their pipelines.
        public let allowedAccounts: [String]

        public init(allowedAccounts: [String]) {
            self.allowedAccounts = allowedAccounts
        }

        public func validate(name: String) throws {
            try self.allowedAccounts.forEach {
                try validate($0, name: "allowedAccounts[]", parent: name, pattern: "[0-9]{12}|\\*")
            }
            try self.validate(self.allowedAccounts, name: "allowedAccounts", parent: name, max: 1000)
            try self.validate(self.allowedAccounts, name: "allowedAccounts", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case allowedAccounts
        }
    }

    public struct ActionTypeProperty: AWSEncodableShape & AWSDecodableShape {
        /// The description of the property that is displayed to users.
        public let description: String?
        /// Whether the configuration property is a key.
        public let key: Bool
        /// The property name. This represents a field name that is displayed to users.
        public let name: String
        /// Determines whether the field value entered by the customer is logged. If noEcho is true, the value is not shown in CloudTrail logs for the action execution.
        public let noEcho: Bool
        /// Whether the configuration property is an optional value.
        public let optional: Bool
        /// Indicates that the property is used with polling. An action type can have up to one queryable property. If it has one, that property must be both required and not secret.
        public let queryable: Bool?

        public init(description: String? = nil, key: Bool, name: String, noEcho: Bool, optional: Bool, queryable: Bool? = nil) {
            self.description = description
            self.key = key
            self.name = name
            self.noEcho = noEcho
            self.optional = optional
            self.queryable = queryable
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 250)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 50)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case key
            case name
            case noEcho
            case optional
            case queryable
        }
    }

    public struct ActionTypeSettings: AWSEncodableShape & AWSDecodableShape {
        /// The URL returned to the AWS CodePipeline console that provides a deep link to the resources of the external system, such as the configuration page for an AWS CodeDeploy deployment group. This link is provided as part of the action display in the pipeline.
        public let entityUrlTemplate: String?
        /// The URL returned to the AWS CodePipeline console that contains a link to the top-level landing page for the external system, such as the console page for AWS CodeDeploy. This link is shown on the pipeline view page in the AWS CodePipeline console and provides a link to the execution entity of the external action.
        public let executionUrlTemplate: String?
        /// The URL returned to the AWS CodePipeline console that contains a link to the page where customers can update or change the configuration of the external action.
        public let revisionUrlTemplate: String?
        /// The URL of a sign-up page where users can sign up for an external service and perform initial configuration of the action provided by that service.
        public let thirdPartyConfigurationUrl: String?

        public init(entityUrlTemplate: String? = nil, executionUrlTemplate: String? = nil, revisionUrlTemplate: String? = nil, thirdPartyConfigurationUrl: String? = nil) {
            self.entityUrlTemplate = entityUrlTemplate
            self.executionUrlTemplate = executionUrlTemplate
            self.revisionUrlTemplate = revisionUrlTemplate
            self.thirdPartyConfigurationUrl = thirdPartyConfigurationUrl
        }

        public func validate(name: String) throws {
            try self.validate(self.entityUrlTemplate, name: "entityUrlTemplate", parent: name, max: 2048)
            try self.validate(self.entityUrlTemplate, name: "entityUrlTemplate", parent: name, min: 1)
            try self.validate(self.executionUrlTemplate, name: "executionUrlTemplate", parent: name, max: 2048)
            try self.validate(self.executionUrlTemplate, name: "executionUrlTemplate", parent: name, min: 1)
            try self.validate(self.revisionUrlTemplate, name: "revisionUrlTemplate", parent: name, max: 2048)
            try self.validate(self.revisionUrlTemplate, name: "revisionUrlTemplate", parent: name, min: 1)
            try self.validate(self.thirdPartyConfigurationUrl, name: "thirdPartyConfigurationUrl", parent: name, max: 2048)
            try self.validate(self.thirdPartyConfigurationUrl, name: "thirdPartyConfigurationUrl", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entityUrlTemplate
            case executionUrlTemplate
            case revisionUrlTemplate
            case thirdPartyConfigurationUrl
        }
    }

    public struct ActionTypeUrls: AWSEncodableShape & AWSDecodableShape {
        /// The URL returned to the CodePipeline console that contains a link to the page where customers can configure the external action.
        public let configurationUrl: String?
        /// The URL returned to the CodePipeline console that provides a deep link to the resources of the external system, such as a status page. This link is provided as part of the action display in the pipeline.
        public let entityUrlTemplate: String?
        /// The link to an execution page for the action type in progress. For example, for a CodeDeploy action, this link is shown on the pipeline view page in the CodePipeline console, and it links to a CodeDeploy status page.
        public let executionUrlTemplate: String?
        /// The URL returned to the CodePipeline console that contains a link to the page where customers can update or change the configuration of the external action.
        public let revisionUrlTemplate: String?

        public init(configurationUrl: String? = nil, entityUrlTemplate: String? = nil, executionUrlTemplate: String? = nil, revisionUrlTemplate: String? = nil) {
            self.configurationUrl = configurationUrl
            self.entityUrlTemplate = entityUrlTemplate
            self.executionUrlTemplate = executionUrlTemplate
            self.revisionUrlTemplate = revisionUrlTemplate
        }

        public func validate(name: String) throws {
            try self.validate(self.configurationUrl, name: "configurationUrl", parent: name, max: 2048)
            try self.validate(self.configurationUrl, name: "configurationUrl", parent: name, min: 1)
            try self.validate(self.entityUrlTemplate, name: "entityUrlTemplate", parent: name, max: 2048)
            try self.validate(self.entityUrlTemplate, name: "entityUrlTemplate", parent: name, min: 1)
            try self.validate(self.executionUrlTemplate, name: "executionUrlTemplate", parent: name, max: 2048)
            try self.validate(self.executionUrlTemplate, name: "executionUrlTemplate", parent: name, min: 1)
            try self.validate(self.revisionUrlTemplate, name: "revisionUrlTemplate", parent: name, max: 2048)
            try self.validate(self.revisionUrlTemplate, name: "revisionUrlTemplate", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case configurationUrl
            case entityUrlTemplate
            case executionUrlTemplate
            case revisionUrlTemplate
        }
    }

    public struct ApprovalResult: AWSEncodableShape {
        /// The response submitted by a reviewer assigned to an approval action request.
        public let status: ApprovalStatus
        /// The summary of the current status of the approval request.
        public let summary: String

        public init(status: ApprovalStatus, summary: String) {
            self.status = status
            self.summary = summary
        }

        public func validate(name: String) throws {
            try self.validate(self.summary, name: "summary", parent: name, max: 512)
            try self.validate(self.summary, name: "summary", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case status
            case summary
        }
    }

    public struct Artifact: AWSDecodableShape {
        /// The location of an artifact.
        public let location: ArtifactLocation?
        /// The artifact's name.
        public let name: String?
        /// The artifact's revision ID. Depending on the type of object, this could be a commit ID (GitHub) or a revision ID (Amazon S3).
        public let revision: String?

        public init(location: ArtifactLocation? = nil, name: String? = nil, revision: String? = nil) {
            self.location = location
            self.name = name
            self.revision = revision
        }

        private enum CodingKeys: String, CodingKey {
            case location
            case name
            case revision
        }
    }

    public struct ArtifactDetail: AWSDecodableShape {
        /// The artifact object name for the action execution.
        public let name: String?
        /// The Amazon S3 artifact location for the action execution.
        public let s3location: S3Location?

        public init(name: String? = nil, s3location: S3Location? = nil) {
            self.name = name
            self.s3location = s3location
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case s3location
        }
    }

    public struct ArtifactDetails: AWSEncodableShape & AWSDecodableShape {
        /// The maximum number of artifacts allowed for the action type.
        public let maximumCount: Int
        /// The minimum number of artifacts allowed for the action type.
        public let minimumCount: Int

        public init(maximumCount: Int, minimumCount: Int) {
            self.maximumCount = maximumCount
            self.minimumCount = minimumCount
        }

        public func validate(name: String) throws {
            try self.validate(self.maximumCount, name: "maximumCount", parent: name, max: 5)
            try self.validate(self.maximumCount, name: "maximumCount", parent: name, min: 0)
            try self.validate(self.minimumCount, name: "minimumCount", parent: name, max: 5)
            try self.validate(self.minimumCount, name: "minimumCount", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case maximumCount
            case minimumCount
        }
    }

    public struct ArtifactLocation: AWSDecodableShape {
        /// The S3 bucket that contains the artifact.
        public let s3Location: S3ArtifactLocation?
        /// The type of artifact in the location.
        public let type: ArtifactLocationType?

        public init(s3Location: S3ArtifactLocation? = nil, type: ArtifactLocationType? = nil) {
            self.s3Location = s3Location
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case s3Location
            case type
        }
    }

    public struct ArtifactRevision: AWSDecodableShape {
        /// The date and time when the most recent revision of the artifact was created, in timestamp format.
        public let created: Date?
        /// The name of an artifact. This name might be system-generated, such as "MyApp", or defined by the user when an action is created.
        public let name: String?
        /// An additional identifier for a revision, such as a commit date or, for artifacts stored in Amazon S3 buckets, the ETag value.
        public let revisionChangeIdentifier: String?
        /// The revision ID of the artifact.
        public let revisionId: String?
        /// Summary information about the most recent revision of the artifact. For GitHub and AWS CodeCommit repositories, the commit message. For Amazon S3 buckets or actions, the user-provided content of a codepipeline-artifact-revision-summary key specified in the object metadata.
        public let revisionSummary: String?
        /// The commit ID for the artifact revision. For artifacts stored in GitHub or AWS CodeCommit repositories, the commit ID is linked to a commit details page.
        public let revisionUrl: String?

        public init(created: Date? = nil, name: String? = nil, revisionChangeIdentifier: String? = nil, revisionId: String? = nil, revisionSummary: String? = nil, revisionUrl: String? = nil) {
            self.created = created
            self.name = name
            self.revisionChangeIdentifier = revisionChangeIdentifier
            self.revisionId = revisionId
            self.revisionSummary = revisionSummary
            self.revisionUrl = revisionUrl
        }

        private enum CodingKeys: String, CodingKey {
            case created
            case name
            case revisionChangeIdentifier
            case revisionId
            case revisionSummary
            case revisionUrl
        }
    }

    public struct ArtifactStore: AWSEncodableShape & AWSDecodableShape {
        /// The encryption key used to encrypt the data in the artifact store, such as an AWS Key Management Service (AWS KMS) key. If this is undefined, the default key for Amazon S3 is used.
        public let encryptionKey: EncryptionKey?
        /// The S3 bucket used for storing the artifacts for a pipeline. You can specify the name of an S3 bucket but not a folder in the bucket. A folder to contain the pipeline artifacts is created for you based on the name of the pipeline. You can use any S3 bucket in the same AWS Region as the pipeline to store your pipeline artifacts.
        public let location: String
        /// The type of the artifact store, such as S3.
        public let type: ArtifactStoreType

        public init(encryptionKey: EncryptionKey? = nil, location: String, type: ArtifactStoreType) {
            self.encryptionKey = encryptionKey
            self.location = location
            self.type = type
        }

        public func validate(name: String) throws {
            try self.encryptionKey?.validate(name: "\(name).encryptionKey")
            try self.validate(self.location, name: "location", parent: name, max: 63)
            try self.validate(self.location, name: "location", parent: name, min: 3)
            try self.validate(self.location, name: "location", parent: name, pattern: "[a-zA-Z0-9\\-\\.]+")
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionKey
            case location
            case type
        }
    }

    public struct BlockerDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// Reserved for future use.
        public let name: String
        /// Reserved for future use.
        public let type: BlockerType

        public init(name: String, type: BlockerType) {
            self.name = name
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case type
        }
    }

    public struct CreateCustomActionTypeInput: AWSEncodableShape {
        /// The category of the custom action, such as a build action or a test action.
        public let category: ActionCategory
        /// The configuration properties for the custom action.  You can refer to a name in the configuration properties of the custom action within the URL templates by following the format of {Config:name}, as long as the configuration property is both required and not secret. For more information, see Create a Custom Action for a Pipeline.
        public let configurationProperties: [ActionConfigurationProperty]?
        /// The details of the input artifact for the action, such as its commit ID.
        public let inputArtifactDetails: ArtifactDetails
        /// The details of the output artifact of the action, such as its commit ID.
        public let outputArtifactDetails: ArtifactDetails
        /// The provider of the service used in the custom action, such as AWS CodeDeploy.
        public let provider: String
        /// URLs that provide users information about this custom action.
        public let settings: ActionTypeSettings?
        /// The tags for the custom action.
        public let tags: [Tag]?
        /// The version identifier of the custom action.
        public let version: String

        public init(category: ActionCategory, configurationProperties: [ActionConfigurationProperty]? = nil, inputArtifactDetails: ArtifactDetails, outputArtifactDetails: ArtifactDetails, provider: String, settings: ActionTypeSettings? = nil, tags: [Tag]? = nil, version: String) {
            self.category = category
            self.configurationProperties = configurationProperties
            self.inputArtifactDetails = inputArtifactDetails
            self.outputArtifactDetails = outputArtifactDetails
            self.provider = provider
            self.settings = settings
            self.tags = tags
            self.version = version
        }

        public func validate(name: String) throws {
            try self.configurationProperties?.forEach {
                try $0.validate(name: "\(name).configurationProperties[]")
            }
            try self.validate(self.configurationProperties, name: "configurationProperties", parent: name, max: 10)
            try self.inputArtifactDetails.validate(name: "\(name).inputArtifactDetails")
            try self.outputArtifactDetails.validate(name: "\(name).outputArtifactDetails")
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "[0-9A-Za-z_-]+")
            try self.settings?.validate(name: "\(name).settings")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "[0-9A-Za-z_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case category
            case configurationProperties
            case inputArtifactDetails
            case outputArtifactDetails
            case provider
            case settings
            case tags
            case version
        }
    }

    public struct CreateCustomActionTypeOutput: AWSDecodableShape {
        /// Returns information about the details of an action type.
        public let actionType: ActionType
        /// Specifies the tags applied to the custom action.
        public let tags: [Tag]?

        public init(actionType: ActionType, tags: [Tag]? = nil) {
            self.actionType = actionType
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case actionType
            case tags
        }
    }

    public struct CreatePipelineInput: AWSEncodableShape {
        /// Represents the structure of actions and stages to be performed in the pipeline.
        public let pipeline: PipelineDeclaration
        /// The tags for the pipeline.
        public let tags: [Tag]?

        public init(pipeline: PipelineDeclaration, tags: [Tag]? = nil) {
            self.pipeline = pipeline
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.pipeline.validate(name: "\(name).pipeline")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case pipeline
            case tags
        }
    }

    public struct CreatePipelineOutput: AWSDecodableShape {
        /// Represents the structure of actions and stages to be performed in the pipeline.
        public let pipeline: PipelineDeclaration?
        /// Specifies the tags applied to the pipeline.
        public let tags: [Tag]?

        public init(pipeline: PipelineDeclaration? = nil, tags: [Tag]? = nil) {
            self.pipeline = pipeline
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case pipeline
            case tags
        }
    }

    public struct CurrentRevision: AWSEncodableShape {
        /// The change identifier for the current revision.
        public let changeIdentifier: String
        /// The date and time when the most recent revision of the artifact was created, in timestamp format.
        public let created: Date?
        /// The revision ID of the current version of an artifact.
        public let revision: String
        /// The summary of the most recent revision of the artifact.
        public let revisionSummary: String?

        public init(changeIdentifier: String, created: Date? = nil, revision: String, revisionSummary: String? = nil) {
            self.changeIdentifier = changeIdentifier
            self.created = created
            self.revision = revision
            self.revisionSummary = revisionSummary
        }

        public func validate(name: String) throws {
            try self.validate(self.changeIdentifier, name: "changeIdentifier", parent: name, max: 100)
            try self.validate(self.changeIdentifier, name: "changeIdentifier", parent: name, min: 1)
            try self.validate(self.revision, name: "revision", parent: name, max: 1500)
            try self.validate(self.revision, name: "revision", parent: name, min: 1)
            try self.validate(self.revisionSummary, name: "revisionSummary", parent: name, max: 2048)
            try self.validate(self.revisionSummary, name: "revisionSummary", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case changeIdentifier
            case created
            case revision
            case revisionSummary
        }
    }

    public struct DeleteCustomActionTypeInput: AWSEncodableShape {
        /// The category of the custom action that you want to delete, such as source or deploy.
        public let category: ActionCategory
        /// The provider of the service used in the custom action, such as AWS CodeDeploy.
        public let provider: String
        /// The version of the custom action to delete.
        public let version: String

        public init(category: ActionCategory, provider: String, version: String) {
            self.category = category
            self.provider = provider
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "[0-9A-Za-z_-]+")
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "[0-9A-Za-z_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case category
            case provider
            case version
        }
    }

    public struct DeletePipelineInput: AWSEncodableShape {
        /// The name of the pipeline to be deleted.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case name
        }
    }

    public struct DeleteWebhookInput: AWSEncodableShape {
        /// The name of the webhook you want to delete.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case name
        }
    }

    public struct DeleteWebhookOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeregisterWebhookWithThirdPartyInput: AWSEncodableShape {
        /// The name of the webhook you want to deregister.
        public let webhookName: String?

        public init(webhookName: String? = nil) {
            self.webhookName = webhookName
        }

        public func validate(name: String) throws {
            try self.validate(self.webhookName, name: "webhookName", parent: name, max: 100)
            try self.validate(self.webhookName, name: "webhookName", parent: name, min: 1)
            try self.validate(self.webhookName, name: "webhookName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case webhookName
        }
    }

    public struct DeregisterWebhookWithThirdPartyOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DisableStageTransitionInput: AWSEncodableShape {
        /// The name of the pipeline in which you want to disable the flow of artifacts from one stage to another.
        public let pipelineName: String
        /// The reason given to the user that a stage is disabled, such as waiting for manual approval or manual tests. This message is displayed in the pipeline console UI.
        public let reason: String
        /// The name of the stage where you want to disable the inbound or outbound transition of artifacts.
        public let stageName: String
        /// Specifies whether artifacts are prevented from transitioning into the stage and being processed by the actions in that stage (inbound), or prevented from transitioning from the stage after they have been processed by the actions in that stage (outbound).
        public let transitionType: StageTransitionType

        public init(pipelineName: String, reason: String, stageName: String, transitionType: StageTransitionType) {
            self.pipelineName = pipelineName
            self.reason = reason
            self.stageName = stageName
            self.transitionType = transitionType
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.reason, name: "reason", parent: name, max: 300)
            try self.validate(self.reason, name: "reason", parent: name, min: 1)
            try self.validate(self.reason, name: "reason", parent: name, pattern: "[a-zA-Z0-9!@ \\(\\)\\.\\*\\?\\-]+")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineName
            case reason
            case stageName
            case transitionType
        }
    }

    public struct EnableStageTransitionInput: AWSEncodableShape {
        /// The name of the pipeline in which you want to enable the flow of artifacts from one stage to another.
        public let pipelineName: String
        /// The name of the stage where you want to enable the transition of artifacts, either into the stage (inbound) or from that stage to the next stage (outbound).
        public let stageName: String
        /// Specifies whether artifacts are allowed to enter the stage and be processed by the actions in that stage (inbound) or whether already processed artifacts are allowed to transition to the next stage (outbound).
        public let transitionType: StageTransitionType

        public init(pipelineName: String, stageName: String, transitionType: StageTransitionType) {
            self.pipelineName = pipelineName
            self.stageName = stageName
            self.transitionType = transitionType
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineName
            case stageName
            case transitionType
        }
    }

    public struct EncryptionKey: AWSEncodableShape & AWSDecodableShape {
        /// The ID used to identify the key. For an AWS KMS key, you can use the key ID, the key ARN, or the alias ARN.  Aliases are recognized only in the account that created the customer master key (CMK). For cross-account actions, you can only use the key ID or key ARN to identify the key.
        public let id: String
        /// The type of encryption key, such as an AWS Key Management Service (AWS KMS) key. When creating or updating a pipeline, the value must be set to 'KMS'.
        public let type: EncryptionKeyType

        public init(id: String, type: EncryptionKeyType) {
            self.id = id
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 400)
            try self.validate(self.id, name: "id", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case type
        }
    }

    public struct ErrorDetails: AWSDecodableShape {
        /// The system ID or number code of the error.
        public let code: String?
        /// The text of the error message.
        public let message: String?

        public init(code: String? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code
            case message
        }
    }

    public struct ExecutionDetails: AWSEncodableShape {
        /// The system-generated unique ID of this action used to identify this job worker in any external systems, such as AWS CodeDeploy.
        public let externalExecutionId: String?
        /// The percentage of work completed on the action, represented on a scale of 0 to 100 percent.
        public let percentComplete: Int?
        /// The summary of the current status of the actions.
        public let summary: String?

        public init(externalExecutionId: String? = nil, percentComplete: Int? = nil, summary: String? = nil) {
            self.externalExecutionId = externalExecutionId
            self.percentComplete = percentComplete
            self.summary = summary
        }

        public func validate(name: String) throws {
            try self.validate(self.externalExecutionId, name: "externalExecutionId", parent: name, max: 1500)
            try self.validate(self.externalExecutionId, name: "externalExecutionId", parent: name, min: 1)
            try self.validate(self.percentComplete, name: "percentComplete", parent: name, max: 100)
            try self.validate(self.percentComplete, name: "percentComplete", parent: name, min: 0)
            try self.validate(self.summary, name: "summary", parent: name, max: 2048)
            try self.validate(self.summary, name: "summary", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case externalExecutionId
            case percentComplete
            case summary
        }
    }

    public struct ExecutionTrigger: AWSDecodableShape {
        /// Detail related to the event that started a pipeline execution, such as the webhook ARN of the webhook that triggered the pipeline execution or the user ARN for a user-initiated start-pipeline-execution CLI command.
        public let triggerDetail: String?
        /// The type of change-detection method, command, or user interaction that started a pipeline execution.
        public let triggerType: TriggerType?

        public init(triggerDetail: String? = nil, triggerType: TriggerType? = nil) {
            self.triggerDetail = triggerDetail
            self.triggerType = triggerType
        }

        private enum CodingKeys: String, CodingKey {
            case triggerDetail
            case triggerType
        }
    }

    public struct ExecutorConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Details about the JobWorker executor of the action type.
        public let jobWorkerExecutorConfiguration: JobWorkerExecutorConfiguration?
        /// Details about the Lambda executor of the action type.
        public let lambdaExecutorConfiguration: LambdaExecutorConfiguration?

        public init(jobWorkerExecutorConfiguration: JobWorkerExecutorConfiguration? = nil, lambdaExecutorConfiguration: LambdaExecutorConfiguration? = nil) {
            self.jobWorkerExecutorConfiguration = jobWorkerExecutorConfiguration
            self.lambdaExecutorConfiguration = lambdaExecutorConfiguration
        }

        public func validate(name: String) throws {
            try self.jobWorkerExecutorConfiguration?.validate(name: "\(name).jobWorkerExecutorConfiguration")
            try self.lambdaExecutorConfiguration?.validate(name: "\(name).lambdaExecutorConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case jobWorkerExecutorConfiguration
            case lambdaExecutorConfiguration
        }
    }

    public struct FailureDetails: AWSEncodableShape {
        /// The external ID of the run of the action that failed.
        public let externalExecutionId: String?
        /// The message about the failure.
        public let message: String
        /// The type of the failure.
        public let type: FailureType

        public init(externalExecutionId: String? = nil, message: String, type: FailureType) {
            self.externalExecutionId = externalExecutionId
            self.message = message
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.externalExecutionId, name: "externalExecutionId", parent: name, max: 1500)
            try self.validate(self.externalExecutionId, name: "externalExecutionId", parent: name, min: 1)
            try self.validate(self.message, name: "message", parent: name, max: 5000)
            try self.validate(self.message, name: "message", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case externalExecutionId
            case message
            case type
        }
    }

    public struct GetActionTypeInput: AWSEncodableShape {
        /// A category defines what kind of action can be taken in the stage. Valid categories are limited to one of the following values:    Source     Build     Test     Deploy     Approval     Invoke
        public let category: ActionCategory
        /// The creator of an action type that has been created with any supported integration model. There are two valid values for the owner field in the action type category: AWS and ThirdParty.
        public let owner: String
        /// The provider of the action type being called. The provider name is specified when the action type is created.
        public let provider: String
        /// A string that describes the action type version.
        public let version: String

        public init(category: ActionCategory, owner: String, provider: String, version: String) {
            self.category = category
            self.owner = owner
            self.provider = provider
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.owner, name: "owner", parent: name, pattern: "AWS|ThirdParty")
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "[0-9A-Za-z_-]+")
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "[0-9A-Za-z_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case category
            case owner
            case provider
            case version
        }
    }

    public struct GetActionTypeOutput: AWSDecodableShape {
        /// The action type information for the requested action type, such as the action type ID.
        public let actionType: ActionTypeDeclaration?

        public init(actionType: ActionTypeDeclaration? = nil) {
            self.actionType = actionType
        }

        private enum CodingKeys: String, CodingKey {
            case actionType
        }
    }

    public struct GetJobDetailsInput: AWSEncodableShape {
        /// The unique system-generated ID for the job.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId
        }
    }

    public struct GetJobDetailsOutput: AWSDecodableShape {
        /// The details of the job.  If AWSSessionCredentials is used, a long-running job can call GetJobDetails again to obtain new credentials.
        public let jobDetails: JobDetails?

        public init(jobDetails: JobDetails? = nil) {
            self.jobDetails = jobDetails
        }

        private enum CodingKeys: String, CodingKey {
            case jobDetails
        }
    }

    public struct GetPipelineExecutionInput: AWSEncodableShape {
        /// The ID of the pipeline execution about which you want to get execution details.
        public let pipelineExecutionId: String
        /// The name of the pipeline about which you want to get execution details.
        public let pipelineName: String

        public init(pipelineExecutionId: String, pipelineName: String) {
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId
            case pipelineName
        }
    }

    public struct GetPipelineExecutionOutput: AWSDecodableShape {
        /// Represents information about the execution of a pipeline.
        public let pipelineExecution: PipelineExecution?

        public init(pipelineExecution: PipelineExecution? = nil) {
            self.pipelineExecution = pipelineExecution
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecution
        }
    }

    public struct GetPipelineInput: AWSEncodableShape {
        /// The name of the pipeline for which you want to get information. Pipeline names must be unique under an AWS user account.
        public let name: String
        /// The version number of the pipeline. If you do not specify a version, defaults to the current version.
        public let version: Int?

        public init(name: String, version: Int? = nil) {
            self.name = name
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.version, name: "version", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case version
        }
    }

    public struct GetPipelineOutput: AWSDecodableShape {
        /// Represents the pipeline metadata information returned as part of the output of a GetPipeline action.
        public let metadata: PipelineMetadata?
        /// Represents the structure of actions and stages to be performed in the pipeline.
        public let pipeline: PipelineDeclaration?

        public init(metadata: PipelineMetadata? = nil, pipeline: PipelineDeclaration? = nil) {
            self.metadata = metadata
            self.pipeline = pipeline
        }

        private enum CodingKeys: String, CodingKey {
            case metadata
            case pipeline
        }
    }

    public struct GetPipelineStateInput: AWSEncodableShape {
        /// The name of the pipeline about which you want to get information.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case name
        }
    }

    public struct GetPipelineStateOutput: AWSDecodableShape {
        /// The date and time the pipeline was created, in timestamp format.
        public let created: Date?
        /// The name of the pipeline for which you want to get the state.
        public let pipelineName: String?
        /// The version number of the pipeline.  A newly created pipeline is always assigned a version number of 1.
        public let pipelineVersion: Int?
        /// A list of the pipeline stage output information, including stage name, state, most recent run details, whether the stage is disabled, and other data.
        public let stageStates: [StageState]?
        /// The date and time the pipeline was last updated, in timestamp format.
        public let updated: Date?

        public init(created: Date? = nil, pipelineName: String? = nil, pipelineVersion: Int? = nil, stageStates: [StageState]? = nil, updated: Date? = nil) {
            self.created = created
            self.pipelineName = pipelineName
            self.pipelineVersion = pipelineVersion
            self.stageStates = stageStates
            self.updated = updated
        }

        private enum CodingKeys: String, CodingKey {
            case created
            case pipelineName
            case pipelineVersion
            case stageStates
            case updated
        }
    }

    public struct GetThirdPartyJobDetailsInput: AWSEncodableShape {
        /// The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
        public let clientToken: String
        /// The unique system-generated ID used for identifying the job.
        public let jobId: String

        public init(clientToken: String, jobId: String) {
            self.clientToken = clientToken
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, max: 512)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case jobId
        }
    }

    public struct GetThirdPartyJobDetailsOutput: AWSDecodableShape {
        /// The details of the job, including any protected values defined for the job.
        public let jobDetails: ThirdPartyJobDetails?

        public init(jobDetails: ThirdPartyJobDetails? = nil) {
            self.jobDetails = jobDetails
        }

        private enum CodingKeys: String, CodingKey {
            case jobDetails
        }
    }

    public struct InputArtifact: AWSEncodableShape & AWSDecodableShape {
        /// The name of the artifact to be worked on (for example, "My App"). The input artifact of an action must exactly match the output artifact declared in a preceding action, but the input artifact does not have to be the next action in strict sequence from the action that provided the output artifact. Actions in parallel can declare different output artifacts, which are in turn consumed by different following actions.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[a-zA-Z0-9_\\-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case name
        }
    }

    public struct Job: AWSDecodableShape {
        /// The ID of the AWS account to use when performing the job.
        public let accountId: String?
        /// Other data about a job.
        public let data: JobData?
        /// The unique system-generated ID of the job.
        public let id: String?
        /// A system-generated random number that AWS CodePipeline uses to ensure that the job is being worked on by only one job worker. Use this number in an AcknowledgeJob request.
        public let nonce: String?

        public init(accountId: String? = nil, data: JobData? = nil, id: String? = nil, nonce: String? = nil) {
            self.accountId = accountId
            self.data = data
            self.id = id
            self.nonce = nonce
        }

        private enum CodingKeys: String, CodingKey {
            case accountId
            case data
            case id
            case nonce
        }
    }

    public struct JobData: AWSDecodableShape {
        /// Represents information about an action configuration.
        public let actionConfiguration: ActionConfiguration?
        /// Represents information about an action type.
        public let actionTypeId: ActionTypeId?
        /// Represents an AWS session credentials object. These credentials are temporary credentials that are issued by AWS Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket used to store artifacts for the pipeline in AWS CodePipeline.
        public let artifactCredentials: AWSSessionCredentials?
        /// A system-generated token, such as a AWS CodeDeploy deployment ID, required by a job to continue the job asynchronously.
        public let continuationToken: String?
        /// Represents information about the key used to encrypt data in the artifact store, such as an AWS Key Management Service (AWS KMS) key.
        public let encryptionKey: EncryptionKey?
        /// The artifact supplied to the job.
        public let inputArtifacts: [Artifact]?
        /// The output of the job.
        public let outputArtifacts: [Artifact]?
        /// Represents information about a pipeline to a job worker.  Includes pipelineArn and pipelineExecutionId for custom jobs.
        public let pipelineContext: PipelineContext?

        public init(actionConfiguration: ActionConfiguration? = nil, actionTypeId: ActionTypeId? = nil, artifactCredentials: AWSSessionCredentials? = nil, continuationToken: String? = nil, encryptionKey: EncryptionKey? = nil, inputArtifacts: [Artifact]? = nil, outputArtifacts: [Artifact]? = nil, pipelineContext: PipelineContext? = nil) {
            self.actionConfiguration = actionConfiguration
            self.actionTypeId = actionTypeId
            self.artifactCredentials = artifactCredentials
            self.continuationToken = continuationToken
            self.encryptionKey = encryptionKey
            self.inputArtifacts = inputArtifacts
            self.outputArtifacts = outputArtifacts
            self.pipelineContext = pipelineContext
        }

        private enum CodingKeys: String, CodingKey {
            case actionConfiguration
            case actionTypeId
            case artifactCredentials
            case continuationToken
            case encryptionKey
            case inputArtifacts
            case outputArtifacts
            case pipelineContext
        }
    }

    public struct JobDetails: AWSDecodableShape {
        /// The AWS account ID associated with the job.
        public let accountId: String?
        /// Represents other information about a job required for a job worker to complete the job.
        public let data: JobData?
        /// The unique system-generated ID of the job.
        public let id: String?

        public init(accountId: String? = nil, data: JobData? = nil, id: String? = nil) {
            self.accountId = accountId
            self.data = data
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case accountId
            case data
            case id
        }
    }

    public struct JobWorkerExecutorConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The accounts in which the job worker is configured and might poll for jobs as part of the action execution.
        public let pollingAccounts: [String]?
        /// The service Principals in which the job worker is configured and might poll for jobs as part of the action execution.
        public let pollingServicePrincipals: [String]?

        public init(pollingAccounts: [String]? = nil, pollingServicePrincipals: [String]? = nil) {
            self.pollingAccounts = pollingAccounts
            self.pollingServicePrincipals = pollingServicePrincipals
        }

        public func validate(name: String) throws {
            try self.pollingAccounts?.forEach {
                try validate($0, name: "pollingAccounts[]", parent: name, pattern: "[0-9]{12}")
            }
            try self.validate(self.pollingAccounts, name: "pollingAccounts", parent: name, max: 1000)
            try self.validate(self.pollingAccounts, name: "pollingAccounts", parent: name, min: 1)
            try self.pollingServicePrincipals?.forEach {
                try validate($0, name: "pollingServicePrincipals[]", parent: name, max: 128)
                try validate($0, name: "pollingServicePrincipals[]", parent: name, min: 1)
            }
            try self.validate(self.pollingServicePrincipals, name: "pollingServicePrincipals", parent: name, max: 10)
            try self.validate(self.pollingServicePrincipals, name: "pollingServicePrincipals", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case pollingAccounts
            case pollingServicePrincipals
        }
    }

    public struct LambdaExecutorConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the Lambda function used by the action engine.
        public let lambdaFunctionArn: String

        public init(lambdaFunctionArn: String) {
            self.lambdaFunctionArn = lambdaFunctionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.lambdaFunctionArn, name: "lambdaFunctionArn", parent: name, max: 140)
            try self.validate(self.lambdaFunctionArn, name: "lambdaFunctionArn", parent: name, min: 1)
            try self.validate(self.lambdaFunctionArn, name: "lambdaFunctionArn", parent: name, pattern: "arn:aws(-[\\w]+)*:lambda:.+:[0-9]{12}:function:.+")
        }

        private enum CodingKeys: String, CodingKey {
            case lambdaFunctionArn
        }
    }

    public struct ListActionExecutionsInput: AWSEncodableShape {
        /// Input information used to filter action execution history.
        public let filter: ActionExecutionFilter?
        /// The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Action execution history is retained for up to 12 months, based on action execution start times. Default value is 100.   Detailed execution history is available for executions run on or after February 21, 2019.
        public let maxResults: Int?
        /// The token that was returned from the previous ListActionExecutions call, which can be used to return the next set of action executions in the list.
        public let nextToken: String?
        ///  The name of the pipeline for which you want to list action execution history.
        public let pipelineName: String

        public init(filter: ActionExecutionFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil, pipelineName: String) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.pipelineName = pipelineName
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case filter
            case maxResults
            case nextToken
            case pipelineName
        }
    }

    public struct ListActionExecutionsOutput: AWSDecodableShape {
        /// The details for a list of recent executions, such as action execution ID.
        public let actionExecutionDetails: [ActionExecutionDetail]?
        /// If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent ListActionExecutions call to return the next set of action executions in the list.
        public let nextToken: String?

        public init(actionExecutionDetails: [ActionExecutionDetail]? = nil, nextToken: String? = nil) {
            self.actionExecutionDetails = actionExecutionDetails
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case actionExecutionDetails
            case nextToken
        }
    }

    public struct ListActionTypesInput: AWSEncodableShape {
        /// Filters the list of action types to those created by a specified entity.
        public let actionOwnerFilter: ActionOwner?
        /// An identifier that was returned from the previous list action types call, which can be used to return the next set of action types in the list.
        public let nextToken: String?
        /// The Region to filter on for the list of action types.
        public let regionFilter: String?

        public init(actionOwnerFilter: ActionOwner? = nil, nextToken: String? = nil, regionFilter: String? = nil) {
            self.actionOwnerFilter = actionOwnerFilter
            self.nextToken = nextToken
            self.regionFilter = regionFilter
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.regionFilter, name: "regionFilter", parent: name, max: 30)
            try self.validate(self.regionFilter, name: "regionFilter", parent: name, min: 4)
        }

        private enum CodingKeys: String, CodingKey {
            case actionOwnerFilter
            case nextToken
            case regionFilter
        }
    }

    public struct ListActionTypesOutput: AWSDecodableShape {
        /// Provides details of the action types.
        public let actionTypes: [ActionType]
        /// If the amount of returned information is significantly large, an identifier is also returned. It can be used in a subsequent list action types call to return the next set of action types in the list.
        public let nextToken: String?

        public init(actionTypes: [ActionType], nextToken: String? = nil) {
            self.actionTypes = actionTypes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case actionTypes
            case nextToken
        }
    }

    public struct ListPipelineExecutionsInput: AWSEncodableShape {
        /// The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Pipeline history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100.
        public let maxResults: Int?
        /// The token that was returned from the previous ListPipelineExecutions call, which can be used to return the next set of pipeline executions in the list.
        public let nextToken: String?
        /// The name of the pipeline for which you want to get execution summary information.
        public let pipelineName: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, pipelineName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.pipelineName = pipelineName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case pipelineName
        }
    }

    public struct ListPipelineExecutionsOutput: AWSDecodableShape {
        /// A token that can be used in the next ListPipelineExecutions call. To view all items in the list, continue to call this operation with each subsequent token until no more nextToken values are returned.
        public let nextToken: String?
        /// A list of executions in the history of a pipeline.
        public let pipelineExecutionSummaries: [PipelineExecutionSummary]?

        public init(nextToken: String? = nil, pipelineExecutionSummaries: [PipelineExecutionSummary]? = nil) {
            self.nextToken = nextToken
            self.pipelineExecutionSummaries = pipelineExecutionSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case pipelineExecutionSummaries
        }
    }

    public struct ListPipelinesInput: AWSEncodableShape {
        /// An identifier that was returned from the previous list pipelines call. It can be used to return the next set of pipelines in the list.
        public let nextToken: String?

        public init(nextToken: String? = nil) {
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
        }
    }

    public struct ListPipelinesOutput: AWSDecodableShape {
        /// If the amount of returned information is significantly large, an identifier is also returned. It can be used in a subsequent list pipelines call to return the next set of pipelines in the list.
        public let nextToken: String?
        /// The list of pipelines.
        public let pipelines: [PipelineSummary]?

        public init(nextToken: String? = nil, pipelines: [PipelineSummary]? = nil) {
            self.nextToken = nextToken
            self.pipelines = pipelines
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case pipelines
        }
    }

    public struct ListTagsForResourceInput: AWSEncodableShape {
        /// The maximum number of results to return in a single call.
        public let maxResults: Int?
        /// The token that was returned from the previous API call, which would be used to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the resource to get tags for.
        public let resourceArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:aws(-[\\w]+)*:codepipeline:.+:[0-9]{12}:.+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case resourceArn
        }
    }

    public struct ListTagsForResourceOutput: AWSDecodableShape {
        /// If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent API call to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.
        public let nextToken: String?
        /// The tags for the resource.
        public let tags: [Tag]?

        public init(nextToken: String? = nil, tags: [Tag]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case tags
        }
    }

    public struct ListWebhookItem: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the webhook.
        public let arn: String?
        /// The detail returned for each webhook, such as the webhook authentication type and filter rules.
        public let definition: WebhookDefinition
        /// The number code of the error.
        public let errorCode: String?
        /// The text of the error message about the webhook.
        public let errorMessage: String?
        /// The date and time a webhook was last successfully triggered, in timestamp format.
        public let lastTriggered: Date?
        /// Specifies the tags applied to the webhook.
        public let tags: [Tag]?
        /// A unique URL generated by CodePipeline. When a POST request is made to this URL, the defined pipeline is started as long as the body of the post request satisfies the defined authentication and filtering conditions. Deleting and re-creating a webhook makes the old URL invalid and generates a new one.
        public let url: String

        public init(arn: String? = nil, definition: WebhookDefinition, errorCode: String? = nil, errorMessage: String? = nil, lastTriggered: Date? = nil, tags: [Tag]? = nil, url: String) {
            self.arn = arn
            self.definition = definition
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.lastTriggered = lastTriggered
            self.tags = tags
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case definition
            case errorCode
            case errorMessage
            case lastTriggered
            case tags
            case url
        }
    }

    public struct ListWebhooksInput: AWSEncodableShape {
        /// The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token that was returned from the previous ListWebhooks call, which can be used to return the next set of webhooks in the list.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListWebhooksOutput: AWSDecodableShape {
        /// If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent ListWebhooks call to return the next set of webhooks in the list.
        public let nextToken: String?
        /// The JSON detail returned for each webhook in the list output for the ListWebhooks call.
        public let webhooks: [ListWebhookItem]?

        public init(nextToken: String? = nil, webhooks: [ListWebhookItem]? = nil) {
            self.nextToken = nextToken
            self.webhooks = webhooks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case webhooks
        }
    }

    public struct OutputArtifact: AWSEncodableShape & AWSDecodableShape {
        /// The name of the output of an artifact, such as "My App". The input artifact of an action must exactly match the output artifact declared in a preceding action, but the input artifact does not have to be the next action in strict sequence from the action that provided the output artifact. Actions in parallel can declare different output artifacts, which are in turn consumed by different following actions. Output artifact names must be unique within a pipeline.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[a-zA-Z0-9_\\-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case name
        }
    }

    public struct PipelineContext: AWSDecodableShape {
        /// The context of an action to a job worker in the stage of a pipeline.
        public let action: ActionContext?
        /// The Amazon Resource Name (ARN) of the pipeline.
        public let pipelineArn: String?
        /// The execution ID of the pipeline.
        public let pipelineExecutionId: String?
        /// The name of the pipeline. This is a user-specified value. Pipeline names must be unique across all pipeline names under an Amazon Web Services account.
        public let pipelineName: String?
        /// The stage of the pipeline.
        public let stage: StageContext?

        public init(action: ActionContext? = nil, pipelineArn: String? = nil, pipelineExecutionId: String? = nil, pipelineName: String? = nil, stage: StageContext? = nil) {
            self.action = action
            self.pipelineArn = pipelineArn
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
            self.stage = stage
        }

        private enum CodingKeys: String, CodingKey {
            case action
            case pipelineArn
            case pipelineExecutionId
            case pipelineName
            case stage
        }
    }

    public struct PipelineDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// Represents information about the S3 bucket where artifacts are stored for the pipeline.  You must include either artifactStore or artifactStores in your pipeline, but you cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores.
        public let artifactStore: ArtifactStore?
        /// A mapping of artifactStore objects and their corresponding AWS Regions. There must be an artifact store for the pipeline Region and for each cross-region action in the pipeline.  You must include either artifactStore or artifactStores in your pipeline, but you cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores.
        public let artifactStores: [String: ArtifactStore]?
        /// The name of the pipeline.
        public let name: String
        /// The Amazon Resource Name (ARN) for AWS CodePipeline to use to either perform actions with no actionRoleArn, or to use to assume roles for actions with an actionRoleArn.
        public let roleArn: String
        /// The stage in which to perform the action.
        public let stages: [StageDeclaration]
        /// The version number of the pipeline. A new pipeline always has a version number of 1. This number is incremented when a pipeline is updated.
        public let version: Int?

        public init(artifactStore: ArtifactStore? = nil, artifactStores: [String: ArtifactStore]? = nil, name: String, roleArn: String, stages: [StageDeclaration], version: Int? = nil) {
            self.artifactStore = artifactStore
            self.artifactStores = artifactStores
            self.name = name
            self.roleArn = roleArn
            self.stages = stages
            self.version = version
        }

        public func validate(name: String) throws {
            try self.artifactStore?.validate(name: "\(name).artifactStore")
            try self.artifactStores?.forEach {
                try validate($0.key, name: "artifactStores.key", parent: name, max: 30)
                try validate($0.key, name: "artifactStores.key", parent: name, min: 4)
                try $0.value.validate(name: "\(name).artifactStores[\"\($0.key)\"]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1024)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "arn:aws(-[\\w]+)*:iam::[0-9]{12}:role/.*")
            try self.stages.forEach {
                try $0.validate(name: "\(name).stages[]")
            }
            try self.validate(self.version, name: "version", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case artifactStore
            case artifactStores
            case name
            case roleArn
            case stages
            case version
        }
    }

    public struct PipelineExecution: AWSDecodableShape {
        /// A list of ArtifactRevision objects included in a pipeline execution.
        public let artifactRevisions: [ArtifactRevision]?
        /// The ID of the pipeline execution.
        public let pipelineExecutionId: String?
        /// The name of the pipeline with the specified pipeline execution.
        public let pipelineName: String?
        /// The version number of the pipeline with the specified pipeline execution.
        public let pipelineVersion: Int?
        /// The status of the pipeline execution.   Cancelled: The pipeline’s definition was updated before the pipeline execution could be completed.   InProgress: The pipeline execution is currently running.   Stopped: The pipeline execution was manually stopped. For more information, see Stopped Executions.   Stopping: The pipeline execution received a request to be manually stopped. Depending on the selected stop mode, the execution is either completing or abandoning in-progress actions. For more information, see Stopped Executions.   Succeeded: The pipeline execution was completed successfully.    Superseded: While this pipeline execution was waiting for the next stage to be completed, a newer pipeline execution advanced and continued through the pipeline instead. For more information, see Superseded Executions.   Failed: The pipeline execution was not completed successfully.
        public let status: PipelineExecutionStatus?
        /// A summary that contains a description of the pipeline execution status.
        public let statusSummary: String?

        public init(artifactRevisions: [ArtifactRevision]? = nil, pipelineExecutionId: String? = nil, pipelineName: String? = nil, pipelineVersion: Int? = nil, status: PipelineExecutionStatus? = nil, statusSummary: String? = nil) {
            self.artifactRevisions = artifactRevisions
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
            self.pipelineVersion = pipelineVersion
            self.status = status
            self.statusSummary = statusSummary
        }

        private enum CodingKeys: String, CodingKey {
            case artifactRevisions
            case pipelineExecutionId
            case pipelineName
            case pipelineVersion
            case status
            case statusSummary
        }
    }

    public struct PipelineExecutionSummary: AWSDecodableShape {
        /// The date and time of the last change to the pipeline execution, in timestamp format.
        public let lastUpdateTime: Date?
        /// The ID of the pipeline execution.
        public let pipelineExecutionId: String?
        /// A list of the source artifact revisions that initiated a pipeline execution.
        public let sourceRevisions: [SourceRevision]?
        /// The date and time when the pipeline execution began, in timestamp format.
        public let startTime: Date?
        /// The status of the pipeline execution.   InProgress: The pipeline execution is currently running.   Stopped: The pipeline execution was manually stopped. For more information, see Stopped Executions.   Stopping: The pipeline execution received a request to be manually stopped. Depending on the selected stop mode, the execution is either completing or abandoning in-progress actions. For more information, see Stopped Executions.   Succeeded: The pipeline execution was completed successfully.    Superseded: While this pipeline execution was waiting for the next stage to be completed, a newer pipeline execution advanced and continued through the pipeline instead. For more information, see Superseded Executions.   Failed: The pipeline execution was not completed successfully.
        public let status: PipelineExecutionStatus?
        /// The interaction that stopped a pipeline execution.
        public let stopTrigger: StopExecutionTrigger?
        /// The interaction or event that started a pipeline execution, such as automated change detection or a StartPipelineExecution API call.
        public let trigger: ExecutionTrigger?

        public init(lastUpdateTime: Date? = nil, pipelineExecutionId: String? = nil, sourceRevisions: [SourceRevision]? = nil, startTime: Date? = nil, status: PipelineExecutionStatus? = nil, stopTrigger: StopExecutionTrigger? = nil, trigger: ExecutionTrigger? = nil) {
            self.lastUpdateTime = lastUpdateTime
            self.pipelineExecutionId = pipelineExecutionId
            self.sourceRevisions = sourceRevisions
            self.startTime = startTime
            self.status = status
            self.stopTrigger = stopTrigger
            self.trigger = trigger
        }

        private enum CodingKeys: String, CodingKey {
            case lastUpdateTime
            case pipelineExecutionId
            case sourceRevisions
            case startTime
            case status
            case stopTrigger
            case trigger
        }
    }

    public struct PipelineMetadata: AWSDecodableShape {
        /// The date and time the pipeline was created, in timestamp format.
        public let created: Date?
        /// The Amazon Resource Name (ARN) of the pipeline.
        public let pipelineArn: String?
        /// The date and time the pipeline was last updated, in timestamp format.
        public let updated: Date?

        public init(created: Date? = nil, pipelineArn: String? = nil, updated: Date? = nil) {
            self.created = created
            self.pipelineArn = pipelineArn
            self.updated = updated
        }

        private enum CodingKeys: String, CodingKey {
            case created
            case pipelineArn
            case updated
        }
    }

    public struct PipelineSummary: AWSDecodableShape {
        /// The date and time the pipeline was created, in timestamp format.
        public let created: Date?
        /// The name of the pipeline.
        public let name: String?
        /// The date and time of the last update to the pipeline, in timestamp format.
        public let updated: Date?
        /// The version number of the pipeline.
        public let version: Int?

        public init(created: Date? = nil, name: String? = nil, updated: Date? = nil, version: Int? = nil) {
            self.created = created
            self.name = name
            self.updated = updated
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case created
            case name
            case updated
            case version
        }
    }

    public struct PollForJobsInput: AWSEncodableShape {
        /// Represents information about an action type.
        public let actionTypeId: ActionTypeId
        /// The maximum number of jobs to return in a poll for jobs call.
        public let maxBatchSize: Int?
        /// A map of property names and values. For an action type with no queryable properties, this value must be null or an empty map. For an action type with a queryable property, you must supply that property as a key in the map. Only jobs whose action configuration matches the mapped value are returned.
        public let queryParam: [String: String]?

        public init(actionTypeId: ActionTypeId, maxBatchSize: Int? = nil, queryParam: [String: String]? = nil) {
            self.actionTypeId = actionTypeId
            self.maxBatchSize = maxBatchSize
            self.queryParam = queryParam
        }

        public func validate(name: String) throws {
            try self.actionTypeId.validate(name: "\(name).actionTypeId")
            try self.validate(self.maxBatchSize, name: "maxBatchSize", parent: name, min: 1)
            try self.queryParam?.forEach {
                try validate($0.key, name: "queryParam.key", parent: name, max: 50)
                try validate($0.key, name: "queryParam.key", parent: name, min: 1)
                try validate($0.value, name: "queryParam[\"\($0.key)\"]", parent: name, max: 50)
                try validate($0.value, name: "queryParam[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "queryParam[\"\($0.key)\"]", parent: name, pattern: "[a-zA-Z0-9_-]+")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case actionTypeId
            case maxBatchSize
            case queryParam
        }
    }

    public struct PollForJobsOutput: AWSDecodableShape {
        /// Information about the jobs to take action on.
        public let jobs: [Job]?

        public init(jobs: [Job]? = nil) {
            self.jobs = jobs
        }

        private enum CodingKeys: String, CodingKey {
            case jobs
        }
    }

    public struct PollForThirdPartyJobsInput: AWSEncodableShape {
        /// Represents information about an action type.
        public let actionTypeId: ActionTypeId
        /// The maximum number of jobs to return in a poll for jobs call.
        public let maxBatchSize: Int?

        public init(actionTypeId: ActionTypeId, maxBatchSize: Int? = nil) {
            self.actionTypeId = actionTypeId
            self.maxBatchSize = maxBatchSize
        }

        public func validate(name: String) throws {
            try self.actionTypeId.validate(name: "\(name).actionTypeId")
            try self.validate(self.maxBatchSize, name: "maxBatchSize", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case actionTypeId
            case maxBatchSize
        }
    }

    public struct PollForThirdPartyJobsOutput: AWSDecodableShape {
        /// Information about the jobs to take action on.
        public let jobs: [ThirdPartyJob]?

        public init(jobs: [ThirdPartyJob]? = nil) {
            self.jobs = jobs
        }

        private enum CodingKeys: String, CodingKey {
            case jobs
        }
    }

    public struct PutActionRevisionInput: AWSEncodableShape {
        /// The name of the action that processes the revision.
        public let actionName: String
        /// Represents information about the version (or revision) of an action.
        public let actionRevision: ActionRevision
        /// The name of the pipeline that starts processing the revision to the source.
        public let pipelineName: String
        /// The name of the stage that contains the action that acts on the revision.
        public let stageName: String

        public init(actionName: String, actionRevision: ActionRevision, pipelineName: String, stageName: String) {
            self.actionName = actionName
            self.actionRevision = actionRevision
            self.pipelineName = pipelineName
            self.stageName = stageName
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 100)
            try self.validate(self.actionName, name: "actionName", parent: name, min: 1)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.actionRevision.validate(name: "\(name).actionRevision")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case actionName
            case actionRevision
            case pipelineName
            case stageName
        }
    }

    public struct PutActionRevisionOutput: AWSDecodableShape {
        /// Indicates whether the artifact revision was previously used in an execution of the specified pipeline.
        public let newRevision: Bool?
        /// The ID of the current workflow state of the pipeline.
        public let pipelineExecutionId: String?

        public init(newRevision: Bool? = nil, pipelineExecutionId: String? = nil) {
            self.newRevision = newRevision
            self.pipelineExecutionId = pipelineExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case newRevision
            case pipelineExecutionId
        }
    }

    public struct PutApprovalResultInput: AWSEncodableShape {
        /// The name of the action for which approval is requested.
        public let actionName: String
        /// The name of the pipeline that contains the action.
        public let pipelineName: String
        /// Represents information about the result of the approval request.
        public let result: ApprovalResult
        /// The name of the stage that contains the action.
        public let stageName: String
        /// The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the GetPipelineState action. It is used to validate that the approval request corresponding to this token is still valid.
        public let token: String

        public init(actionName: String, pipelineName: String, result: ApprovalResult, stageName: String, token: String) {
            self.actionName = actionName
            self.pipelineName = pipelineName
            self.result = result
            self.stageName = stageName
            self.token = token
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 100)
            try self.validate(self.actionName, name: "actionName", parent: name, min: 1)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.result.validate(name: "\(name).result")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.token, name: "token", parent: name, pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
        }

        private enum CodingKeys: String, CodingKey {
            case actionName
            case pipelineName
            case result
            case stageName
            case token
        }
    }

    public struct PutApprovalResultOutput: AWSDecodableShape {
        /// The timestamp showing when the approval or rejection was submitted.
        public let approvedAt: Date?

        public init(approvedAt: Date? = nil) {
            self.approvedAt = approvedAt
        }

        private enum CodingKeys: String, CodingKey {
            case approvedAt
        }
    }

    public struct PutJobFailureResultInput: AWSEncodableShape {
        /// The details about the failure of a job.
        public let failureDetails: FailureDetails
        /// The unique system-generated ID of the job that failed. This is the same ID returned from PollForJobs.
        public let jobId: String

        public init(failureDetails: FailureDetails, jobId: String) {
            self.failureDetails = failureDetails
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.failureDetails.validate(name: "\(name).failureDetails")
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
        }

        private enum CodingKeys: String, CodingKey {
            case failureDetails
            case jobId
        }
    }

    public struct PutJobSuccessResultInput: AWSEncodableShape {
        /// A token generated by a job worker, such as an AWS CodeDeploy deployment ID, that a successful job provides to identify a custom action in progress. Future jobs use this token to identify the running instance of the action. It can be reused to return more information about the progress of the custom action. When the action is complete, no continuation token should be supplied.
        public let continuationToken: String?
        /// The ID of the current revision of the artifact successfully worked on by the job.
        public let currentRevision: CurrentRevision?
        /// The execution details of the successful job, such as the actions taken by the job worker.
        public let executionDetails: ExecutionDetails?
        /// The unique system-generated ID of the job that succeeded. This is the same ID returned from PollForJobs.
        public let jobId: String
        /// Key-value pairs produced as output by a job worker that can be made available to a downstream action configuration. outputVariables can be included only when there is no continuation token on the request.
        public let outputVariables: [String: String]?

        public init(continuationToken: String? = nil, currentRevision: CurrentRevision? = nil, executionDetails: ExecutionDetails? = nil, jobId: String, outputVariables: [String: String]? = nil) {
            self.continuationToken = continuationToken
            self.currentRevision = currentRevision
            self.executionDetails = executionDetails
            self.jobId = jobId
            self.outputVariables = outputVariables
        }

        public func validate(name: String) throws {
            try self.validate(self.continuationToken, name: "continuationToken", parent: name, max: 2048)
            try self.validate(self.continuationToken, name: "continuationToken", parent: name, min: 1)
            try self.currentRevision?.validate(name: "\(name).currentRevision")
            try self.executionDetails?.validate(name: "\(name).executionDetails")
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
            try self.outputVariables?.forEach {
                try validate($0.key, name: "outputVariables.key", parent: name, pattern: "[A-Za-z0-9@\\-_]+")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case continuationToken
            case currentRevision
            case executionDetails
            case jobId
            case outputVariables
        }
    }

    public struct PutThirdPartyJobFailureResultInput: AWSEncodableShape {
        /// The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
        public let clientToken: String
        /// Represents information about failure details.
        public let failureDetails: FailureDetails
        /// The ID of the job that failed. This is the same ID returned from PollForThirdPartyJobs.
        public let jobId: String

        public init(clientToken: String, failureDetails: FailureDetails, jobId: String) {
            self.clientToken = clientToken
            self.failureDetails = failureDetails
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.failureDetails.validate(name: "\(name).failureDetails")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 512)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case failureDetails
            case jobId
        }
    }

    public struct PutThirdPartyJobSuccessResultInput: AWSEncodableShape {
        /// The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
        public let clientToken: String
        /// A token generated by a job worker, such as an AWS CodeDeploy deployment ID, that a successful job provides to identify a partner action in progress. Future jobs use this token to identify the running instance of the action. It can be reused to return more information about the progress of the partner action. When the action is complete, no continuation token should be supplied.
        public let continuationToken: String?
        /// Represents information about a current revision.
        public let currentRevision: CurrentRevision?
        /// The details of the actions taken and results produced on an artifact as it passes through stages in the pipeline.
        public let executionDetails: ExecutionDetails?
        /// The ID of the job that successfully completed. This is the same ID returned from PollForThirdPartyJobs.
        public let jobId: String

        public init(clientToken: String, continuationToken: String? = nil, currentRevision: CurrentRevision? = nil, executionDetails: ExecutionDetails? = nil, jobId: String) {
            self.clientToken = clientToken
            self.continuationToken = continuationToken
            self.currentRevision = currentRevision
            self.executionDetails = executionDetails
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.continuationToken, name: "continuationToken", parent: name, max: 2048)
            try self.validate(self.continuationToken, name: "continuationToken", parent: name, min: 1)
            try self.currentRevision?.validate(name: "\(name).currentRevision")
            try self.executionDetails?.validate(name: "\(name).executionDetails")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 512)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case continuationToken
            case currentRevision
            case executionDetails
            case jobId
        }
    }

    public struct PutWebhookInput: AWSEncodableShape {
        /// The tags for the webhook.
        public let tags: [Tag]?
        /// The detail provided in an input file to create the webhook, such as the webhook name, the pipeline name, and the action name. Give the webhook a unique name that helps you identify it. You might name the webhook after the pipeline and action it targets so that you can easily recognize what it's used for later.
        public let webhook: WebhookDefinition

        public init(tags: [Tag]? = nil, webhook: WebhookDefinition) {
            self.tags = tags
            self.webhook = webhook
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.webhook.validate(name: "\(name).webhook")
        }

        private enum CodingKeys: String, CodingKey {
            case tags
            case webhook
        }
    }

    public struct PutWebhookOutput: AWSDecodableShape {
        /// The detail returned from creating the webhook, such as the webhook name, webhook URL, and webhook ARN.
        public let webhook: ListWebhookItem?

        public init(webhook: ListWebhookItem? = nil) {
            self.webhook = webhook
        }

        private enum CodingKeys: String, CodingKey {
            case webhook
        }
    }

    public struct RegisterWebhookWithThirdPartyInput: AWSEncodableShape {
        /// The name of an existing webhook created with PutWebhook to register with a supported third party.
        public let webhookName: String?

        public init(webhookName: String? = nil) {
            self.webhookName = webhookName
        }

        public func validate(name: String) throws {
            try self.validate(self.webhookName, name: "webhookName", parent: name, max: 100)
            try self.validate(self.webhookName, name: "webhookName", parent: name, min: 1)
            try self.validate(self.webhookName, name: "webhookName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case webhookName
        }
    }

    public struct RegisterWebhookWithThirdPartyOutput: AWSDecodableShape {
        public init() {}
    }

    public struct RetryStageExecutionInput: AWSEncodableShape {
        /// The ID of the pipeline execution in the failed stage to be retried. Use the GetPipelineState action to retrieve the current pipelineExecutionId of the failed stage
        public let pipelineExecutionId: String
        /// The name of the pipeline that contains the failed stage.
        public let pipelineName: String
        /// The scope of the retry attempt. Currently, the only supported value is FAILED_ACTIONS.
        public let retryMode: StageRetryMode
        /// The name of the failed stage to be retried.
        public let stageName: String

        public init(pipelineExecutionId: String, pipelineName: String, retryMode: StageRetryMode, stageName: String) {
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
            self.retryMode = retryMode
            self.stageName = stageName
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId
            case pipelineName
            case retryMode
            case stageName
        }
    }

    public struct RetryStageExecutionOutput: AWSDecodableShape {
        /// The ID of the current workflow execution in the failed stage.
        public let pipelineExecutionId: String?

        public init(pipelineExecutionId: String? = nil) {
            self.pipelineExecutionId = pipelineExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId
        }
    }

    public struct S3ArtifactLocation: AWSDecodableShape {
        /// The name of the S3 bucket.
        public let bucketName: String
        /// The key of the object in the S3 bucket, which uniquely identifies the object in the bucket.
        public let objectKey: String

        public init(bucketName: String, objectKey: String) {
            self.bucketName = bucketName
            self.objectKey = objectKey
        }

        private enum CodingKeys: String, CodingKey {
            case bucketName
            case objectKey
        }
    }

    public struct S3Location: AWSDecodableShape {
        /// The Amazon S3 artifact bucket for an action's artifacts.
        public let bucket: String?
        /// The artifact name.
        public let key: String?

        public init(bucket: String? = nil, key: String? = nil) {
            self.bucket = bucket
            self.key = key
        }

        private enum CodingKeys: String, CodingKey {
            case bucket
            case key
        }
    }

    public struct SourceRevision: AWSDecodableShape {
        /// The name of the action that processed the revision to the source artifact.
        public let actionName: String
        /// The system-generated unique ID that identifies the revision number of the artifact.
        public let revisionId: String?
        /// Summary information about the most recent revision of the artifact. For GitHub and AWS CodeCommit repositories, the commit message. For Amazon S3 buckets or actions, the user-provided content of a codepipeline-artifact-revision-summary key specified in the object metadata.
        public let revisionSummary: String?
        /// The commit ID for the artifact revision. For artifacts stored in GitHub or AWS CodeCommit repositories, the commit ID is linked to a commit details page.
        public let revisionUrl: String?

        public init(actionName: String, revisionId: String? = nil, revisionSummary: String? = nil, revisionUrl: String? = nil) {
            self.actionName = actionName
            self.revisionId = revisionId
            self.revisionSummary = revisionSummary
            self.revisionUrl = revisionUrl
        }

        private enum CodingKeys: String, CodingKey {
            case actionName
            case revisionId
            case revisionSummary
            case revisionUrl
        }
    }

    public struct StageContext: AWSDecodableShape {
        /// The name of the stage.
        public let name: String?

        public init(name: String? = nil) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name
        }
    }

    public struct StageDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// The actions included in a stage.
        public let actions: [ActionDeclaration]
        /// Reserved for future use.
        public let blockers: [BlockerDeclaration]?
        /// The name of the stage.
        public let name: String

        public init(actions: [ActionDeclaration], blockers: [BlockerDeclaration]? = nil, name: String) {
            self.actions = actions
            self.blockers = blockers
            self.name = name
        }

        public func validate(name: String) throws {
            try self.actions.forEach {
                try $0.validate(name: "\(name).actions[]")
            }
            try self.blockers?.forEach {
                try $0.validate(name: "\(name).blockers[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case actions
            case blockers
            case name
        }
    }

    public struct StageExecution: AWSDecodableShape {
        /// The ID of the pipeline execution associated with the stage.
        public let pipelineExecutionId: String
        /// The status of the stage, or for a completed stage, the last status of the stage.  A status of cancelled means that the pipeline’s definition was updated before the stage execution could be completed.
        public let status: StageExecutionStatus

        public init(pipelineExecutionId: String, status: StageExecutionStatus) {
            self.pipelineExecutionId = pipelineExecutionId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId
            case status
        }
    }

    public struct StageState: AWSDecodableShape {
        /// The state of the stage.
        public let actionStates: [ActionState]?
        public let inboundExecution: StageExecution?
        /// The state of the inbound transition, which is either enabled or disabled.
        public let inboundTransitionState: TransitionState?
        /// Information about the latest execution in the stage, including its ID and status.
        public let latestExecution: StageExecution?
        /// The name of the stage.
        public let stageName: String?

        public init(actionStates: [ActionState]? = nil, inboundExecution: StageExecution? = nil, inboundTransitionState: TransitionState? = nil, latestExecution: StageExecution? = nil, stageName: String? = nil) {
            self.actionStates = actionStates
            self.inboundExecution = inboundExecution
            self.inboundTransitionState = inboundTransitionState
            self.latestExecution = latestExecution
            self.stageName = stageName
        }

        private enum CodingKeys: String, CodingKey {
            case actionStates
            case inboundExecution
            case inboundTransitionState
            case latestExecution
            case stageName
        }
    }

    public struct StartPipelineExecutionInput: AWSEncodableShape {
        /// The system-generated unique ID used to identify a unique execution request.
        public let clientRequestToken: String?
        /// The name of the pipeline to start.
        public let name: String

        public init(clientRequestToken: String? = StartPipelineExecutionInput.idempotencyToken(), name: String) {
            self.clientRequestToken = clientRequestToken
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 128)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken
            case name
        }
    }

    public struct StartPipelineExecutionOutput: AWSDecodableShape {
        /// The unique system-generated ID of the pipeline execution that was started.
        public let pipelineExecutionId: String?

        public init(pipelineExecutionId: String? = nil) {
            self.pipelineExecutionId = pipelineExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId
        }
    }

    public struct StopExecutionTrigger: AWSDecodableShape {
        /// The user-specified reason the pipeline was stopped.
        public let reason: String?

        public init(reason: String? = nil) {
            self.reason = reason
        }

        private enum CodingKeys: String, CodingKey {
            case reason
        }
    }

    public struct StopPipelineExecutionInput: AWSEncodableShape {
        /// Use this option to stop the pipeline execution by abandoning, rather than finishing, in-progress actions.  This option can lead to failed or out-of-sequence tasks.
        public let abandon: Bool?
        /// The ID of the pipeline execution to be stopped in the current stage. Use the GetPipelineState action to retrieve the current pipelineExecutionId.
        public let pipelineExecutionId: String
        /// The name of the pipeline to stop.
        public let pipelineName: String
        /// Use this option to enter comments, such as the reason the pipeline was stopped.
        public let reason: String?

        public init(abandon: Bool? = nil, pipelineExecutionId: String, pipelineName: String, reason: String? = nil) {
            self.abandon = abandon
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
            self.reason = reason
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.reason, name: "reason", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case abandon
            case pipelineExecutionId
            case pipelineName
            case reason
        }
    }

    public struct StopPipelineExecutionOutput: AWSDecodableShape {
        /// The unique system-generated ID of the pipeline execution that was stopped.
        public let pipelineExecutionId: String?

        public init(pipelineExecutionId: String? = nil) {
            self.pipelineExecutionId = pipelineExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The tag's key.
        public let key: String
        /// The tag's value.
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case key
            case value
        }
    }

    public struct TagResourceInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource you want to add tags to.
        public let resourceArn: String
        /// The tags you want to modify or add to the resource.
        public let tags: [Tag]

        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:aws(-[\\w]+)*:codepipeline:.+:[0-9]{12}:.+")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case tags
        }
    }

    public struct TagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct ThirdPartyJob: AWSDecodableShape {
        /// The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
        public let clientId: String?
        /// The identifier used to identify the job in AWS CodePipeline.
        public let jobId: String?

        public init(clientId: String? = nil, jobId: String? = nil) {
            self.clientId = clientId
            self.jobId = jobId
        }

        private enum CodingKeys: String, CodingKey {
            case clientId
            case jobId
        }
    }

    public struct ThirdPartyJobData: AWSDecodableShape {
        /// Represents information about an action configuration.
        public let actionConfiguration: ActionConfiguration?
        /// Represents information about an action type.
        public let actionTypeId: ActionTypeId?
        /// Represents an AWS session credentials object. These credentials are temporary credentials that are issued by AWS Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket used to store artifact for the pipeline in AWS CodePipeline.
        public let artifactCredentials: AWSSessionCredentials?
        /// A system-generated token, such as a AWS CodeDeploy deployment ID, that a job requires to continue the job asynchronously.
        public let continuationToken: String?
        /// The encryption key used to encrypt and decrypt data in the artifact store for the pipeline, such as an AWS Key Management Service (AWS KMS) key. This is optional and might not be present.
        public let encryptionKey: EncryptionKey?
        /// The name of the artifact that is worked on by the action, if any. This name might be system-generated, such as "MyApp", or it might be defined by the user when the action is created. The input artifact name must match the name of an output artifact generated by an action in an earlier action or stage of the pipeline.
        public let inputArtifacts: [Artifact]?
        /// The name of the artifact that is the result of the action, if any. This name might be system-generated, such as "MyBuiltApp", or it might be defined by the user when the action is created.
        public let outputArtifacts: [Artifact]?
        /// Represents information about a pipeline to a job worker.  Does not include pipelineArn and pipelineExecutionId for ThirdParty jobs.
        public let pipelineContext: PipelineContext?

        public init(actionConfiguration: ActionConfiguration? = nil, actionTypeId: ActionTypeId? = nil, artifactCredentials: AWSSessionCredentials? = nil, continuationToken: String? = nil, encryptionKey: EncryptionKey? = nil, inputArtifacts: [Artifact]? = nil, outputArtifacts: [Artifact]? = nil, pipelineContext: PipelineContext? = nil) {
            self.actionConfiguration = actionConfiguration
            self.actionTypeId = actionTypeId
            self.artifactCredentials = artifactCredentials
            self.continuationToken = continuationToken
            self.encryptionKey = encryptionKey
            self.inputArtifacts = inputArtifacts
            self.outputArtifacts = outputArtifacts
            self.pipelineContext = pipelineContext
        }

        private enum CodingKeys: String, CodingKey {
            case actionConfiguration
            case actionTypeId
            case artifactCredentials
            case continuationToken
            case encryptionKey
            case inputArtifacts
            case outputArtifacts
            case pipelineContext
        }
    }

    public struct ThirdPartyJobDetails: AWSDecodableShape {
        /// The data to be returned by the third party job worker.
        public let data: ThirdPartyJobData?
        /// The identifier used to identify the job details in AWS CodePipeline.
        public let id: String?
        /// A system-generated random number that AWS CodePipeline uses to ensure that the job is being worked on by only one job worker. Use this number in an AcknowledgeThirdPartyJob request.
        public let nonce: String?

        public init(data: ThirdPartyJobData? = nil, id: String? = nil, nonce: String? = nil) {
            self.data = data
            self.id = id
            self.nonce = nonce
        }

        private enum CodingKeys: String, CodingKey {
            case data
            case id
            case nonce
        }
    }

    public struct TransitionState: AWSDecodableShape {
        /// The user-specified reason why the transition between two stages of a pipeline was disabled.
        public let disabledReason: String?
        /// Whether the transition between stages is enabled (true) or disabled (false).
        public let enabled: Bool?
        /// The timestamp when the transition state was last changed.
        public let lastChangedAt: Date?
        /// The ID of the user who last changed the transition state.
        public let lastChangedBy: String?

        public init(disabledReason: String? = nil, enabled: Bool? = nil, lastChangedAt: Date? = nil, lastChangedBy: String? = nil) {
            self.disabledReason = disabledReason
            self.enabled = enabled
            self.lastChangedAt = lastChangedAt
            self.lastChangedBy = lastChangedBy
        }

        private enum CodingKeys: String, CodingKey {
            case disabledReason
            case enabled
            case lastChangedAt
            case lastChangedBy
        }
    }

    public struct UntagResourceInput: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the resource to remove tags from.
        public let resourceArn: String
        /// The list of keys for the tags to be removed from the resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:aws(-[\\w]+)*:codepipeline:.+:[0-9]{12}:.+")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case tagKeys
        }
    }

    public struct UntagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateActionTypeInput: AWSEncodableShape {
        /// The action type definition for the action type to be updated.
        public let actionType: ActionTypeDeclaration?

        public init(actionType: ActionTypeDeclaration? = nil) {
            self.actionType = actionType
        }

        public func validate(name: String) throws {
            try self.actionType?.validate(name: "\(name).actionType")
        }

        private enum CodingKeys: String, CodingKey {
            case actionType
        }
    }

    public struct UpdatePipelineInput: AWSEncodableShape {
        /// The name of the pipeline to be updated.
        public let pipeline: PipelineDeclaration

        public init(pipeline: PipelineDeclaration) {
            self.pipeline = pipeline
        }

        public func validate(name: String) throws {
            try self.pipeline.validate(name: "\(name).pipeline")
        }

        private enum CodingKeys: String, CodingKey {
            case pipeline
        }
    }

    public struct UpdatePipelineOutput: AWSDecodableShape {
        /// The structure of the updated pipeline.
        public let pipeline: PipelineDeclaration?

        public init(pipeline: PipelineDeclaration? = nil) {
            self.pipeline = pipeline
        }

        private enum CodingKeys: String, CodingKey {
            case pipeline
        }
    }

    public struct WebhookAuthConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The property used to configure acceptance of webhooks in an IP address range. For IP, only the AllowedIPRange property must be set. This property must be set to a valid CIDR range.
        public let allowedIPRange: String?
        /// The property used to configure GitHub authentication. For GITHUB_HMAC, only the SecretToken property must be set.
        public let secretToken: String?

        public init(allowedIPRange: String? = nil, secretToken: String? = nil) {
            self.allowedIPRange = allowedIPRange
            self.secretToken = secretToken
        }

        public func validate(name: String) throws {
            try self.validate(self.allowedIPRange, name: "allowedIPRange", parent: name, max: 100)
            try self.validate(self.allowedIPRange, name: "allowedIPRange", parent: name, min: 1)
            try self.validate(self.secretToken, name: "secretToken", parent: name, max: 100)
            try self.validate(self.secretToken, name: "secretToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case allowedIPRange = "AllowedIPRange"
            case secretToken = "SecretToken"
        }
    }

    public struct WebhookDefinition: AWSEncodableShape & AWSDecodableShape {
        /// Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.   For information about the authentication scheme implemented by GITHUB_HMAC, see Securing your webhooks on the GitHub Developer website.    IP rejects webhooks trigger requests unless they originate from an IP address in the IP range whitelisted in the authentication configuration.    UNAUTHENTICATED accepts all webhook trigger requests regardless of origin.
        public let authentication: WebhookAuthenticationType
        /// Properties that configure the authentication applied to incoming webhook trigger requests. The required properties depend on the authentication type. For GITHUB_HMAC, only the SecretToken property must be set. For IP, only the AllowedIPRange property must be set to a valid CIDR range. For UNAUTHENTICATED, no properties can be set.
        public let authenticationConfiguration: WebhookAuthConfiguration
        /// A list of rules applied to the body/payload sent in the POST request to a webhook URL. All defined rules must pass for the request to be accepted and the pipeline started.
        public let filters: [WebhookFilterRule]
        /// The name of the webhook.
        public let name: String
        /// The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline.
        public let targetAction: String
        /// The name of the pipeline you want to connect to the webhook.
        public let targetPipeline: String

        public init(authentication: WebhookAuthenticationType, authenticationConfiguration: WebhookAuthConfiguration, filters: [WebhookFilterRule], name: String, targetAction: String, targetPipeline: String) {
            self.authentication = authentication
            self.authenticationConfiguration = authenticationConfiguration
            self.filters = filters
            self.name = name
            self.targetAction = targetAction
            self.targetPipeline = targetPipeline
        }

        public func validate(name: String) throws {
            try self.authenticationConfiguration.validate(name: "\(name).authenticationConfiguration")
            try self.filters.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 5)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.targetAction, name: "targetAction", parent: name, max: 100)
            try self.validate(self.targetAction, name: "targetAction", parent: name, min: 1)
            try self.validate(self.targetAction, name: "targetAction", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
            try self.validate(self.targetPipeline, name: "targetPipeline", parent: name, max: 100)
            try self.validate(self.targetPipeline, name: "targetPipeline", parent: name, min: 1)
            try self.validate(self.targetPipeline, name: "targetPipeline", parent: name, pattern: "[A-Za-z0-9.@\\-_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case authentication
            case authenticationConfiguration
            case filters
            case name
            case targetAction
            case targetPipeline
        }
    }

    public struct WebhookFilterRule: AWSEncodableShape & AWSDecodableShape {
        /// A JsonPath expression that is applied to the body/payload of the webhook. The value selected by the JsonPath expression must match the value specified in the MatchEquals field. Otherwise, the request is ignored. For more information, see Java JsonPath implementation in GitHub.
        public let jsonPath: String
        /// The value selected by the JsonPath expression must match what is supplied in the MatchEquals field. Otherwise, the request is ignored. Properties from the target action configuration can be included as placeholders in this value by surrounding the action configuration key with curly brackets. For example, if the value supplied here is "refs/heads/{Branch}" and the target action has an action configuration property called "Branch" with a value of "master", the MatchEquals value is evaluated as "refs/heads/master". For a list of action configuration properties for built-in action types, see Pipeline Structure Reference Action Requirements.
        public let matchEquals: String?

        public init(jsonPath: String, matchEquals: String? = nil) {
            self.jsonPath = jsonPath
            self.matchEquals = matchEquals
        }

        public func validate(name: String) throws {
            try self.validate(self.jsonPath, name: "jsonPath", parent: name, max: 150)
            try self.validate(self.jsonPath, name: "jsonPath", parent: name, min: 1)
            try self.validate(self.matchEquals, name: "matchEquals", parent: name, max: 150)
            try self.validate(self.matchEquals, name: "matchEquals", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case jsonPath
            case matchEquals
        }
    }
}
